sched_setaffinity.2: sched_getaffinity returns the number of bytes copied On success, it returns min(len, cpumask_size()) where len is the output buffer size (see the syscall definition in kernel/sched/core.c). Signed-off-by: Brice Goglin <Brice.Goglin@xxxxxxxx> --- man2/sched_setaffinity.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man2/sched_setaffinity.2 b/man2/sched_setaffinity.2 index 74bbde81c..277edd0fb 100644 --- a/man2/sched_setaffinity.2 +++ b/man2/sched_setaffinity.2 @@ -107,9 +107,9 @@ is zero, then the mask of the calling thread is returned. .SH RETURN VALUE On success, .BR sched_setaffinity () -and +returns 0, while .BR sched_getaffinity () -return 0. +returns the number of bytes copied to the destination mask. On error, \-1 is returned, and .I errno is set appropriately. -- 2.20.1