setpgid.2: ERRORS: add EPERM for nonexisting process group
PATCH 1/1 setpgid.2: ERRORS: add EPERM for nonexisting process group
--- man2/setpgid.2 | 5 +++++ 1 file changed, 5 insertions(+)
man2/setpgid.2 +5 -0
@@ -214,6 +214,11 @@ a session leader .RB ( setpgid (), .BR setpgrp ()). .TP +.B EPERM +The target process group does not exists. +.RB ( setpgid (), +.BR setpgrp ()). +.TP .B ESRCH For .BR getpgid ():
Signature · 1 line
2.34.1
Hello Guy,
Quoted 10 lines · Guy Shefy
Signed-off-by Guy Shefy <[email protected]>--- man2/setpgid.2 | 5 +++++ 1 file changed, 5 insertions(+)man2/setpgid.2 +0
-0
man2/setpgid.2 a session leader · line 221
Quoted 8 lines
man2/setpgid.2 +5
-0@@ -214,6 +214,11 @@ a session leader .RB ( setpgid (), .BR setpgrp ()). .TP +.B EPERM +The target process group does not exists. +.RB ( setpgid (), +.BR setpgrp ()). +.TP
Could you please document how you found this in the commit message?
Thanks,
Alex
Quoted 3 lines
man2/setpgid.2 +0
-0.B ESRCH For .BR getpgid ():
Signature · 2 lines
<http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
From d2da0c74521195f4211bdc25089bbd6b420010c0 Mon Sep 17 00:00:00 2001
From: Guy Shefy <[email protected]>
Date: Mon, 20 Feb 2023 17:54:40 +0200
Subject: [PATCH] setpgid.2: ERRORS: add EPERM for nonexisting process group
found using test program:
int main() {
pid_t pid_a = fork();
if (!pid_a) {
// pid_a is not a valid process group
sleep(1); // stay alive
return 0;
}
if (!fork()) {
setpgid(0, pid_a);
perror("setpgid");
return 0;
}
sleep(1); // stay alive
return 0;
}--- man2/setpgid.2 | 5 +++++ 1 file changed, 5 insertions(+)
man2/setpgid.2 +5 -0
@@ -214,6 +214,11 @@ a session leader .RB ( setpgid (), .BR setpgrp ()). .TP +.B EPERM +The target process group does not exists. +.RB ( setpgid (), +.BR setpgrp ()). +.TP .B ESRCH For .BR getpgid ():
Signature · 1 line
2.34.1
Quoted 36 lines · Alex Colomar
Hello Guy,
Quoted 10 lines · Guy Shefy
Signed-off-by Guy Shefy <[email protected]>--- man2/setpgid.2 | 5 +++++ 1 file changed, 5 insertions(+)man2/setpgid.2 +0
-0man2/setpgid.2 a session leader · line 221
Quoted 8 lines
man2/setpgid.2 +5
-0@@ -214,6 +214,11 @@ a session leader .RB ( setpgid (), .BR setpgrp ()). .TP +.B EPERM +The target process group does not exists. +.RB ( setpgid (), +.BR setpgrp ()). +.TPCould you please document how you found this in the commit message?
Thanks,
Alex
Quoted 3 lines
man2/setpgid.2 +0
-0.B ESRCH For .BR getpgid ():Signature · 2 lines
<http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
From 961b64515b805caadb5a77e3592eb3e883c57e0d Mon Sep 17 00:00:00 2001
From: Guy Shefy <[email protected]>
Date: Mon, 20 Feb 2023 17:54:40 +0200
Subject: [PATCH] setpgid.2: ERRORS: add EPERM for nonexisting process group
found using test program:
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main() {
pid_t pid_a = fork();
if (!pid_a) {
// pid_a is not a valid process group
sleep(1); // stay alive
return 0;
}
if (!fork()) {
setpgid(0, pid_a);
perror("setpgid");
return 0;
}
sleep(1); // stay alive
return 0;
}--- man2/setpgid.2 | 5 +++++ 1 file changed, 5 insertions(+)
man2/setpgid.2 +5 -0
@@ -214,6 +214,11 @@ a session leader .RB ( setpgid (), .BR setpgrp ()). .TP +.B EPERM +The target process group does not exists. +.RB ( setpgid (), +.BR setpgrp ()). +.TP .B ESRCH For .BR getpgid ():
Signature · 1 line
2.34.1
Quoted 87 lines · Guy Shefy
Quoted 1 line
From
d2da0c74521195f4211bdc25089bbd6b420010c0Mon Sep 17 00:00:00 2001From: Guy Shefy <[email protected]>
Date: Mon, 20 Feb 2023 17:54:40 +0200
Subject: [PATCH] setpgid.2: ERRORS: add EPERM for nonexisting process groupfound using test program:
int main() { pid_t pid_a = fork(); if (!pid_a) { // pid_a is not a valid process group sleep(1); // stay alive return 0; } if (!fork()) { setpgid(0, pid_a); perror("setpgid"); return 0; } sleep(1); // stay alive return 0; }Signed-off-by Guy Shefy <[email protected]>--- man2/setpgid.2 | 5 +++++ 1 file changed, 5 insertions(+)man2/setpgid.2 +5
-0@@ -214,6 +214,11 @@ a session leader .RB ( setpgid (), .BR setpgrp ()). .TP +.B EPERM +The target process group does not exists. +.RB ( setpgid (), +.BR setpgrp ()). +.TP .B ESRCH For .BR getpgid ():Signature · 1 line
2.34.1Quoted 36 lines · Alex Colomar
Hello Guy,
Quoted 10 lines · Guy Shefy
Signed-off-by Guy Shefy <[email protected]>--- man2/setpgid.2 | 5 +++++ 1 file changed, 5 insertions(+)man2/setpgid.2 +0
-0man2/setpgid.2 a session leader · line 221
Quoted 8 lines
man2/setpgid.2 +5
-0@@ -214,6 +214,11 @@ a session leader .RB ( setpgid (), .BR setpgrp ()). .TP +.B EPERM +The target process group does not exists. +.RB ( setpgid (), +.BR setpgrp ()). +.TPCould you please document how you found this in the commit message?
Thanks,
Alex
Quoted 3 lines
man2/setpgid.2 +0
-0.B ESRCH For .BR getpgid ():Signature · 2 lines
<http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Hi Guy,
Quoted 27 lines · Guy Shefy
From
961b64515b805caadb5a77e3592eb3e883c57e0dMon Sep 17 00:00:00 2001
From: Guy Shefy <[email protected]>
Date: Mon, 20 Feb 2023 17:54:40 +0200
Subject: [PATCH] setpgid.2: ERRORS: add EPERM for nonexisting process groupfound using test program:
#include <
stdio.h>
#include <sys/types.h>
#include <unistd.h>int main() { pid_t pid_a = fork(); if (!pid_a) { // pid_a is not a valid process group sleep(1); // stay alive return 0; } if (!fork()) { setpgid(0, pid_a); perror("setpgid"); return 0; } sleep(1); // stay alive return 0; }
Quoted 1 line
Signed-off-by Guy Shefy <[email protected]>
Patch applied. Thanks very much for the example program!
Alex
Quoted 20 lines
--- man2/setpgid.2 | 5 +++++ 1 file changed, 5 insertions(+)man2/setpgid.2 +5
-0@@ -214,6 +214,11 @@ a session leader .RB ( setpgid (), .BR setpgrp ()). .TP +.B EPERM +The target process group does not exists. +.RB ( setpgid (), +.BR setpgrp ()). +.TP .B ESRCH For .BR getpgid ():
Signature · 2 lines
<http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5