> I agree w/ that. I'd love to rip out the complex code we have there, and
do
> it right. I think the solution lies w/ Process Groups.
I've exercised a test program (I stored it in python/misc/pgrp.py for want
of a better place) that appears to do what we want here. As such, for
'posix'==os.name, 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
os.killpg(os.getpgid(forkPID))]
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.
regards,
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]