spawning a process using os.spawn

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Jun 11 10:47:46 EDT 2009


En Tue, 09 Jun 2009 15:38:53 -0300, rkmr.em at gmail.com <rkmr.em at gmail.com>
escribió:

> im spawning a script that runs for a long from a web app like this:
>
> os.spawnle(os.P_NOWAIT, "../bin/producenotify.py", "producenotify.py",
> "xx",os.environ)
>
>
> the script is spawned and it runs, but till it gets over i am not able to
> free the port that is used by the web app, or in other words i am not  
> able
> to restart the web app. how do i spawn off a process and make it  
> completely
> independent of the web app?

Try subprocess.Popen instead, setting close_fds=True

-- 
Gabriel Genellina




More information about the Python-list mailing list