Re: [Tutor] cgi script to start another process in background

2009-02-26 Thread Ravi Kondamuru
I am running this on a freebsd 4.9 system running apache server. I started with code that was as simple as yours. But the problem is apache does not print "hello before the fork" until the child exists.I have read at various forums that apache buffers till the script exists and in this case till th

Re: [Tutor] cgi script to start another process in background

2009-02-26 Thread Jay Deiman
Ravi Kondamuru wrote: 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

[Tutor] cgi script to start another process in background

2009-02-22 Thread Ravi Kondamuru
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