Hi!

On Wed, Mar 12, 2008 at 12:05:29PM +0200, Liviu Daia wrote:
>On 12 March 2008, Lars NoodC)n <[EMAIL PROTECTED]> wrote:
>[...]
>> And, is there a generic way to prevent them?  The cause is a perl CGI
>> called by apache2

>    Depending on what you're doing, make the parent wait(2) for the
>processes or setsid(3).

setsid(2) (yes, it's section 2 on OpenBSD) doesn't make the child lose
the connection to the parent. See the source of daemon(3) for how to
use setsid in connection with fork and exit (in fact _exit) to make a
process "disconnect" from its parent and its controlling terminal etc.

Kind regards,

Hannah.

Reply via email to