Hello tech@, When reading up on setsid I found ERRORS section confusing. It indicates that EPERM may occur if the process group ID of a process other than the calling process matches the process ID of the calling process.
To me this appears to be in contradiction with the fork manpage, which states: The child process has a unique process ID, which also does not match any existing process group ID. So how can the former occur if the latter states that it's unique? If there's no way the former can occur, can we just scratch that part from the manual, even though it's the literal POSIX text? martijn@ Index: setsid.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/setsid.2,v retrieving revision 1.14 diff -u -p -r1.14 setsid.2 --- setsid.2 31 May 2015 23:54:25 -0000 1.14 +++ setsid.2 13 Sep 2017 11:53:41 -0000 @@ -62,9 +62,7 @@ returns \-1 and the global variable is set to indicate the error, as follows: .Bl -tag -width Er .It Bq Er EPERM -The calling process is already a process group leader, or the process -group ID of a process other than the calling process matches the process -ID of the calling process. +The calling process is already a process group leader. .El .Sh SEE ALSO .Xr getsid 2 ,
