At 04:02 PM 12/15/00 +0100, Stas Bekman wrote:
>> Am I missing something?
>
>You don't miss anything, the above code is an example of daemonization.
>You don't really need to call setsid() for a *forked* process that was
>started to execute something and quit. 
>
>It's different if you call system() to spawn the process. But since it's a
>child of the parent httpd it's not a leader anyway so you don't need the
>extra fork I suppose. Am I correct?
>
>In fact it's good that you've posted this doc snippet, I'll use it as it's
>more complete and cleaner. Thanks.

Thank goodness!  I like this thread -- It's been hard keeping up with all
the posts just to see if PHP or Java is better than mod_perl ;)

Stas, will you please post your additions/notification about this when you
are done?  I do hope you go into a bit of detail on this, as I've posted
questions about setsid a number of times and locations and I'm still
unclear about when or when not to use it, why to use it, and how that might
relate to mod_perl and why it makes a difference between system() vs. fork.
 I've just blindly followed perlipc's recommendations.

BTW -- this isn't related to the infrequently reported problem of an Apache
child that won't die even with kill -9, is it?

Eagerly awaiting,



Bill Moseley
mailto:[EMAIL PROTECTED]

Reply via email to