From: Ahelenia Ziemiańska Date: Thu, 29 May 2025 18:13:03 +0000 (+0200) Subject: man/man2/sched_setaffinity.2: EXAMPLES: Use 0 instead of getpid() X-Git-Tag: man-pages-6.15~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc19e4afae1b13bb5840e8d9dfec0f0fe67d38ce;p=thirdparty%2Fman-pages.git man/man2/sched_setaffinity.2: EXAMPLES: Use 0 instead of getpid() getpid() is superfluous here. Signed-off-by: Ahelenia Ziemiańska Message-ID: Signed-off-by: Alejandro Colomar --- diff --git a/man/man2/sched_setaffinity.2 b/man/man2/sched_setaffinity.2 index 1bdfa4e63..fa49c716d 100644 --- a/man/man2/sched_setaffinity.2 +++ b/man/man2/sched_setaffinity.2 @@ -370,7 +370,7 @@ main(int argc, char *argv[]) case 0: /* Child */ CPU_SET(childCPU, &set); \& - if (sched_setaffinity(getpid(), sizeof(set), &set) == \-1) + if (sched_setaffinity(0, sizeof(set), &set) == \-1) err(EXIT_FAILURE, "sched_setaffinity"); \& for (unsigned int j = 0; j < nloops; j++) @@ -381,7 +381,7 @@ main(int argc, char *argv[]) default: /* Parent */ CPU_SET(parentCPU, &set); \& - if (sched_setaffinity(getpid(), sizeof(set), &set) == \-1) + if (sched_setaffinity(0, sizeof(set), &set) == \-1) err(EXIT_FAILURE, "sched_setaffinity"); \& for (unsigned int j = 0; j < nloops; j++)