I found myself getting very confused a while back by some changes that I found when moving Python scripts from Linux over to OSX...
On Linux, if a python script has called os.system(), and the calling process is killed, the called process will be killed at the same time.
On OSX, however, if the main process is killed, anything that it launched is left behind.
Is there something somewhere in OSX/Python where I can change this behaviour?
This is causing problems on our render farm, where the processes can be killed from the management GUI, but the top level process is really just a wrapper, so, while the render farm management might think that the process has gone and the machine is freed up for another task, the actual processor-intensive task is still running, which can lead to huge blockages.
I know that I could write more logic to catch the kill signal and pass it on to the child processes, but I was hoping that it might be something that could be enabled at a lower level.
tcsh(ick) is starting the Python wrapper process. Is it done with theexeccommand prefix, or is it just a regular command in a script? On the kill side, you might use something likestrace(Linux) orktrace+kdump(Mac OS X) to find out how the signal is being sent (kill/killpg? negative PID argument?). These will give clues for further investigations. – Chris Johnsen Jan 24 '10 at 13:02