diff options
| author | Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> | 2025-05-29 20:13:03 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-05-30 01:37:30 +0200 |
| commit | bc19e4afae1b13bb5840e8d9dfec0f0fe67d38ce (patch) | |
| tree | 50ea254ea7c9f11a2bf69d25a0359fe0c5fbceee /man/man2/sched_setaffinity.2 | |
| parent | fa894b642bfde5dad33aefee55066c3ef94ae8a7 (diff) | |
| download | man-pages-bc19e4afae1b13bb5840e8d9dfec0f0fe67d38ce.tar.gz | |
man/man2/sched_setaffinity.2: EXAMPLES: Use 0 instead of getpid()
getpid() is superfluous here.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Message-ID: <v5p4zfqrepnrorszmuie47aiulivcykicxuhtxfkqhrq5t3cis@tarta.nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man2/sched_setaffinity.2')
| -rw-r--r-- | man/man2/sched_setaffinity.2 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man/man2/sched_setaffinity.2 b/man/man2/sched_setaffinity.2 index 1bdfa4e63e..fa49c716db 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++) |
