2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-05 16:55:43 +00:00

make: config -- Add test for prlimit call

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2013-05-23 13:34:50 +04:00
committed by Pavel Emelyanov
parent 88b13cffbe
commit fc7c13ded0
2 changed files with 21 additions and 0 deletions

View File

@@ -11,3 +11,21 @@ int main(void)
return opts.opt_val;
}
endef
define PRLIMIT_TEST
#include <stdlib.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
int main(void)
{
struct rlimit limit = {
.rlim_cur = RLIM_INFINITY,
.rlim_max = RLIM_INFINITY,
};
return prlimit(getpid(), RLIMIT_CPU, &limit, NULL);
}
endef