Aug-05-2017, 09:28 PM
I'm writing a small application implemented using AJAX. Most of it works. The xgttp object calls a python script which terminates having responded with data.
In one case, the Python script creates a sub process which needs to run in background playing a midi file. The parent process terminates but the readyStatus sticks at 1 until the child process terminates. This is strange, as I've verified that the parent process has terminated and the child is still running and has been inherited by init. But Netstat is still showing the http connection as Established.
The child process is called with:
Regards - Philip
In one case, the Python script creates a sub process which needs to run in background playing a midi file. The parent process terminates but the readyStatus sticks at 1 until the child process terminates. This is strange, as I've verified that the parent process has terminated and the child is still running and has been inherited by init. But Netstat is still showing the http connection as Established.
The child process is called with:
subprocess.Popen(["/home/pi/staticisor/stat.py", "-p" , "%s/%s.mid" % (songdir, song)], close_fds=True)How can I arrange for the readyStatus to progress to 4 as soon as the parent process dies?
Regards - Philip