Re: wait but kill if a max. time was exceeeded

2015-04-24 Thread Peter Pentchev
On Thu, Apr 23, 2015 at 05:45:50PM +0200, Laurent Bercot wrote: On 23/04/2015 17:41, Gorka Lertxundi wrote: I have a very simple question, is it possible in execline to wait up to a maximum amount of time to finish a background program execution? And if it didn't finish, kill it forcibly?

Re: wait but kill if a max. time was exceeeded

2015-04-24 Thread Laurent Bercot
On 24/04/2015 13:28, Peter Pentchev wrote: Oof, thanks a LOT for taking away the opportunity for me to advertise http://devel.ringlet.net/sysutils/timelimit/ :P Sorry about that. :P It's not a very original idea anyway. busybox timeout, for instance, does the same thing. I'm sure there are

Re: wait but kill if a max. time was exceeeded

2015-04-23 Thread Laurent Bercot
On 23/04/2015 17:41, Gorka Lertxundi wrote: I have a very simple question, is it possible in execline to wait up to a maximum amount of time to finish a background program execution? And if it didn't finish, kill it forcibly? Does this help ?

wait but kill if a max. time was exceeeded

2015-04-23 Thread Gorka Lertxundi
I have a very simple question, is it possible in execline to wait up to a maximum amount of time to finish a background program execution? And if it didn't finish, kill it forcibly? Something like this: background { whatever... } wait -t ${MAX_TIME} { ${!} } foreground { kill -9 ${i} } prog