From bc19e4afae1b13bb5840e8d9dfec0f0fe67d38ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ahelenia=20Ziemia=C5=84ska?= Date: Thu, 29 May 2025 20:13:03 +0200 Subject: [PATCH] man/man2/sched_setaffinity.2: EXAMPLES: Use 0 instead of getpid() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit getpid() is superfluous here. Signed-off-by: Ahelenia Ziemiańska Message-ID: Signed-off-by: Alejandro Colomar --- man/man2/sched_setaffinity.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++) -- 2.47.2