[Tutor] cgi script to start another process in background
Ravi Kondamuru
ravikondamuru at gmail.com
Sun Feb 22 09:16:52 CET 2009
Hi,
I am trying to write a python cgi script, that invokes another process and
exists.
Using the subprocess documentation on NO_WAIT, I am not having much success:
pid = os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg")
==>
pid = Popen(["/bin/mycmd", "myarg"]).pid
The script seems to wait for the new process to exit before returning to the
user.
I tried doing the double-fork approach discussed here:
http://code.activestate.com/recipes/66012/
I am not having much luck.
Any ideas on how to accomplish this appreciated.
thanks,
Ravi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090222/02631c7a/attachment-0001.htm>
More information about the Tutor
mailing list