Re: system call that is killed after n seconds if not finished

2012-04-18 Thread Miki Tebeka
> I would like to execute shell commands, but only if their execution > time is not longer than n seconds. Like so: See example at http://docs.python.org/library/signal.html#example -- http://mail.python.org/mailman/listinfo/python-list

Re: system call that is killed after n seconds if not finished

2012-04-17 Thread Adam Skutt
On Apr 16, 11:34 am, Alain Ketterlin wrote: > Jaroslav Dobrek writes: > > I would like to execute shell commands, but only if their execution > > time is not longer than n seconds. Like so: > > > monitor(os.system("do_something"), 5) > > > I.e. the command do_somthing should be executed by the op

Re: system call that is killed after n seconds if not finished

2012-04-16 Thread Alain Ketterlin
Jaroslav Dobrek writes: > I would like to execute shell commands, but only if their execution > time is not longer than n seconds. Like so: > > monitor(os.system("do_something"), 5) > > I.e. the command do_somthing should be executed by the operating > system. If the call has not finished after 5

Re: system call that is killed after n seconds if not finished

2012-04-16 Thread Benjamin Kaplan
On Mon, Apr 16, 2012 at 10:51 AM, Jaroslav Dobrek wrote: > > Hello, > > I would like to execute shell commands, but only if their execution > time is not longer than n seconds. Like so: > > monitor(os.system("do_something"), 5) > > I.e. the command do_somthing should be executed by the operating >

system call that is killed after n seconds if not finished

2012-04-16 Thread Jaroslav Dobrek
Hello, I would like to execute shell commands, but only if their execution time is not longer than n seconds. Like so: monitor(os.system("do_something"), 5) I.e. the command do_somthing should be executed by the operating system. If the call has not finished after 5 seconds, the process should b