Am 31.01.2012 um 22:51 schrieb Ben De Luca: > Strangely im pondering this issue at the moment. If a python process > is killed any process started with subprocess does not die.
Yes, there is no safety kill in SGE when a job leaves the system. > The two methods im following, > > 1. a reaper, the grid job starts a python process (parent) that starts > two other jobs, the task, and the reaper. > A. The task is the process I want to run. > B. The reaper, sits waiting to see if the parent python process > disappears, if it does it cleans up process A. Why is the process starting subprocesses at all? This might oversubscribe the granted slots for the job. > When Parent sees A finishes normally it kills B. > If Parent is killed B kills A. You could scan for the additional attached group ID for all processes and kill them. -- Reuti > 2. I think an epilog can be run to clean up. > > > On Tue, Jan 31, 2012 at 8:00 PM, Hugh Macdonald > <[email protected]> wrote: >> Hi, >> >> I've got a python script here that is run through Grid. When I requeue the >> job, I want to catch the signal in the script, to do a bit of cleanup before >> exiting. I don't seem to be able to catch the signal, making me assume that >> it's SIGKILL that is being sent. Am I right in this assumption, and, if so, >> is there any way to change it to SIGTERM? >> >> >> Thanks >> >> >> Hugh Macdonald >> nvizible – VISUAL EFFECTS >> >> [email protected] >> +44(0) 20 3167 3860 >> +44(0) 7773 764 708 >> >> www.nvizible.com >> >> >> _______________________________________________ >> users mailing list >> [email protected] >> https://gridengine.org/mailman/listinfo/users >> > > _______________________________________________ > users mailing list > [email protected] > https://gridengine.org/mailman/listinfo/users > _______________________________________________ users mailing list [email protected] https://gridengine.org/mailman/listinfo/users
