session mgmt: does POSIX indeed prohibit NOOP execution?
Christoph Moench-Tegeder
cmt at burggraben.net
Mon Jan 6 00:11:01 UTC 2020
## Peter (peter at citylink.dinoex.sub.org):
> When a program is invoked via /usr/sbin/daemon, it should already be
> session leader AND group leader, and then the above code WOULD be a
> NOOP, unless POSIX would require the setpgid() to fail and thereby the
> program to abort - which, btw, is NOT a NOOP :(
https://pubs.opengroup.org/onlinepubs/9699919799/
"The setpgid() function shall fail if: [...] The process indicated by the
pid argument is a session leader."
Not much room to argue?
Regards,
Christoph
--
Spare Space
More information about the freebsd-stable
mailing list