child process

Alex Martelli aleax at aleax.it
Mon Aug 27 04:10:32 EDT 2001


"Brian Lee" <senux at senux.com.NOSPAM> wrote in message
news:3B89F556.70500 at senux.com.NOSPAM...
> Hi,
>
> I made a child process by fork function. When the mother
> process is killed, the child process is killed also.
>
> But I want child process not to be killed even the mother
> process is killed. How can I child process run independently?

You appear to want to fork a "daemon" child-process on
some kind of Unix-like platform; then, see Herrmann's
recipe on the Python Cookbook, at:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012

Hermann gives working code; to understand what's going on,
you really need Stevens' "Advanced Programming in the Unix
Environment" book (an EXCELLENT book, by the way).


Alex






More information about the Python-list mailing list