gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam R. B. Jack" <>
Subject Re: Killed dozens of processes again
Date Mon, 21 Mar 2005 00:56:23 GMT

> I agree w/ that. I'd love to rip out the complex code we have there, and
> it right. I think the solution lies w/ Process Groups.

I've exercised a test program (I stored it in python/misc/ for want
of a better place) that appears to do what we want here. As such, for
'posix', we'll:

    1) fork, getting forkPID for the child process.
    2) [child]:     setpgrp [become a group leader], run child processes...
    3) [parent]:   wait w/ a timer to sigkill the group [using

Note: We wouldn't need to fork if we didn't corrupt our own ENV prior to
calling os.system, however (1) I think os.system (albeit perhaps unsafe) if
easier to work with than the alternatives (2) this may be historical & not
good today. I'll look at it some time.

I am keeping around the convoluted lancher code (which invokes a new Python
process, to set environment,etc., to run children) for windows OS. I'd like
to get rid of this code, but I don't think I can.

BTW: We got lucky that we move to Python 2.3 a while ago 'cos these methods
were new in 2.3.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message