On Wed, Jan 02, 2002 at 05:57:16PM -0500, Michael Handler wrote: > I'd also like to voice my support for implementing Jos' requested > functionality. NO_DETACH may have originally been intended just for > debugging purposes, but many sites are moving to universal process > managers like djb's daemontools, and it would be extremely useful > to all of us if Apache's httpd provided the necessary knob to run > under svscan & supervise out of the box.
I see no reason why this can't be implemented in apache2, and I'll even test and commit a patch that properly implements it. :) Sorry I can't offer much more than that. Maybe if I get some more time later this week I can look into it, but the more surefire way to get it in would be to provide a patch. > Correct. The don't-fork-but-still-setsid mode is a specialized > method meant for process controllers only, and it should be > administrator brain damage to try and utilize it from an interactive > shell -- much like invoking a daemon with verbose debug arguments > and then complaining about the output. :) I think putting a note > in the documentation to this effect should be sufficient. Also note > that invoking this mode from shells without job control (Solaris > /bin/sh) works fine, as they don't try and create unique process > groups for each invoked job, AFAICT. I would just expect the -DFOREGROUND patch to check if httpd is the process groupleader and error out instead of calling setsid() and continuing. > I submitted a patch regarding this issue for 1.3.22 earlier today, > in which I also noted 2.0's issue with setsid(2) regarding this. > (Sorry for the bad line-wrap in the PR.) > > http://bugs.apache.org/index.cgi/full/9341 Sorry, I can't comment on 1.3, that's not my forté. Perhaps one of the ol' timers on here have something to say about it? ;) -aaron