HP3000-L Archives

January 1997, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Breemer <[log in to unmask]>
Reply To:
Chris Breemer <[log in to unmask]>
Date:
Thu, 30 Jan 1997 11:50:43 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (20 lines)
Mike Paivinen replied:

>
> This is expected behavior.  We don't support the UNIX method of creating
> daemons.  When a parent process terminates, so do all of its children.  One
> way to fix this problem is to run the standalone version in a job and make
> the parent process block forever instead of terminating.
>
I'd say the parent process should just use wait() and/or waitpid() to block until
the kids are finished. This is standard POSIX and should work. In fact I tested this
with one child process and waitpid() and it works as it should. With wait() you
should be able to wait for all kids to terminate (haven't tried that out but I know
it works on UNIX).

Actually the man pages for wait/waitpid say you *should* use these calls to prevent
kids being killed upon parent exit.

        Chris Breemer
        Compuware Europe B.V.

ATOM RSS1 RSS2