Aaron Bannert <[EMAIL PROTECTED]> writes:

> Now that I think about it a little more, we should probably always
> exit if setsid() fails.

That sounds good. The only instance I can see setsid(2) legitimately
failing other than OS resource exhaustion or something is when you
invoke httpd -F interactively under a shell with job control, and
well, if you need to do that, invoke a non-job control shell first.

> It might be useful to change the error message
> if no_detach is set ("setsid() failed probably because you aren't
> running under a process management tool like daemontools" vs "setsid()
> failed, unable to create new session"). Then we just do the fork fork()
> if !no_detach. Confused yet?

As long as you still do the fork(2) decision before the setsid(2) call,
no. :)

Reply via email to