pythonic exec* spawn*

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Thu Feb 9 20:41:16 EST 2006


Daniel Nogradi:
>> os.fork() does that (on Mac and Unix).
>
>Okay, but how?

Sorry, fork() is implemented strictly on a 'need to know' basis :-)

>It seems to me that if the process which issued os.fork() ends, then 
>the forked process also ends.

No, no, they're not a quantum mechanic photon pair. Every process decides
for itself if and when to end. As long as it's not signalled/killed, that
is.

>But the execute of longer( data ) should keep going even though the
>original program ended. I'm pretty sure it's something basic and
>probably I'm not aware of the right concepts and that's why I can't
>find the right place to look in the docs.

You can search for "daemonize".

Here's a recipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012

The concept is best explained in this book:
http://www.kohala.com/start/apue.html

-- 
René Pijlman



More information about the Python-list mailing list