I wrote this python script (part of a bigger program) to launch a php script and wait for the output.
The PHP script takes almost 15 minutes to run, as it is spawning several perl & C programs of its own.
When I launch the php script by itself, it runs perfectly and always has.
But when I wrap this in python, it runs for a while, then just stops.
When I view active tasks in my shell, I can still see the python script running and the php script it allegedly is running still shows up. However, it never completes, it just hangs there. The PHP script should be writing to a file, but after about 5 minutes it just stops doing anything.
def protocol2():
cmd = 'php /usr/bin/protocol2 -q 1 -s %s -t %s -o %s -m %i > /dev/null' %(sys.argv[1]+'.faa',sys.argv[2]+'.faa','./',defaults['max_gsat'])
args = shlex.split(cmd)
return subprocess.Popen(args, stdout=subprocess.PIPE)
P2 = protocol2()
P2.wait()
print "Finished"