From b3bbc7b16067c82e528d3de580f807b8316f096e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 29 Jun 2016 11:54:03 -0400 Subject: [PATCH] fix incorrect definition of RUSAGE_CHILDREN in sys/resource.h the kernel ABI value for RUSAGE_CHILDREN is -1, not 1. the latter is actually interpreted as RUSAGE_THREAD, to obtain values for just the calling thread and not the whole process. --- include/sys/resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/resource.h b/include/sys/resource.h index cc33de74..ef02a391 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -68,7 +68,7 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *); #define PRIO_USER 2 #define RUSAGE_SELF 0 -#define RUSAGE_CHILDREN 1 +#define RUSAGE_CHILDREN (-1) #define RLIM_INFINITY (~0ULL) #define RLIM_SAVED_CUR RLIM_INFINITY -- 2.25.1