Re: Run process with timeout

2005-10-17 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alex Martelli) wrote: > Micah Elliott <[EMAIL PROTECTED]> wrote: [... re problem killing children of shell script ...] > > Is there any way to enable Python's subprocess module to do (implicit?) > > group setup to ease killing of all children?

Re: Run process with timeout

2005-10-17 Thread Alex Martelli
Micah Elliott <[EMAIL PROTECTED]> wrote: > Is there any way to enable Python's subprocess module to do (implicit?) > group setup to ease killing of all children? If not, is it a reasonable > RFE? Not as far as I know. It might be a reasonable request in suitable dialects of Unix-like OSes, thou

Re: Run process with timeout

2005-10-17 Thread Micah Elliott
On Oct 17, Alex Martelli wrote: > Natan <[EMAIL PROTECTED]> wrote: > > I have a python script under linux where I poll many hundreds of > > interfaces with mrtg every 5 minutes. Today I create some threads and > > use os.system(command) to run the process, but some of them just hang. > > I would li

Re: Run process with timeout

2005-10-17 Thread P
Natan wrote: > Hi. > > I have a python script under linux where I poll many hundreds of > interfaces with mrtg every 5 minutes. Today I create some threads and > use os.system(command) to run the process, but some of them just hang. > I would like to terminate the process after 15 seconds if it do

Re: Run process with timeout

2005-10-17 Thread Alex Martelli
Natan <[EMAIL PROTECTED]> wrote: > Hi. > > I have a python script under linux where I poll many hundreds of > interfaces with mrtg every 5 minutes. Today I create some threads and > use os.system(command) to run the process, but some of them just hang. > I would like to terminate the process afte

Run process with timeout

2005-10-17 Thread Natan
Hi. I have a python script under linux where I poll many hundreds of interfaces with mrtg every 5 minutes. Today I create some threads and use os.system(command) to run the process, but some of them just hang. I would like to terminate the process after 15 seconds if it doesn't finish, but os.syst