On Thu, Dec 10, 2009 at 2:10 PM, Andrew McNabb <[email protected]> wrote:
> 2) Alternatively, you can create a new process group with setpgid() (and
> you might have to create a new session, too, with setsid()--I'd have to
> think about this a little bit more).  If your Python script is a process
> group leader, then all other processes in the group should be killed if
> your script (the process group leader) exits.

Very cool.  Any idea if it would work under cygwin?  Sadly, I have to
support it.  Even more sad, I just discovered that cygwin comes with
python 2.5, which doesn't have subprocess.terminate().  I really liked
your addition of the exception handling around that too.

Bryan
--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list

Reply via email to