[2.4.2/Linux] Getting Python to fork?

Gilles Ganault nospam at nospam.com
Sun Feb 3 21:52:06 EST 2008


Hello

	I need to launch a Python script, and fork it so that the calling
script can resume with the next step will the Python script keeps
running.

I tried those two, but they don't work, as the calling script is stuck
until the Python script ends:

sys.stdout = open(os.devnull, 'w')

=====
#if os.fork():
pid = os.fork()   
if pid > 0:       
        sys.exit(0)        
=====

Should I use another library to do this?

Thank you.



More information about the Python-list mailing list