Any program that does a setsid() should fork first, because
shells that do the above get horribly confused by programs that
call setsid() and are still under the shell's control.
Ergo: I personally do not think that the new semantics are wrong.
>But that could easily break POSIX conformance, I don't know...
It does break POSIX, at least, if what Stevens says in APitUE
(my substitute for POSIX :) is correct:
...
pid_t setsid(void);
...
This function returns an error if the caller is already a
process group leader.
-- Michiel Boland <boland@sci.kun.nl> University of Nijmegen The Netherlands