[CentOS] Re: command to ensure other command does last longer than5 seconds
William L. Maltby
CentOS4Bill at triad.rr.comSat Apr 7 18:08:35 UTC 2007
- Previous message: [CentOS] Re: command to ensure other command does last longer than5 seconds
- Next message: [CentOS] Re: command to ensure other command does last longer than5 seconds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 2007-04-07 at 14:03 -0400, William L. Maltby wrote: > On Sat, 2007-04-07 at 14:20 -0300, Rodrigo Barbosa wrote: > <snip> > > > > If I've got your meaning write, you are proposing something like: > > > > ( sleep $TIMER; kill -WHATEVER $PID )& > > > > Which is pretty interesting way to do it, which I haven't though about > > until now. I never tried (...)&, and after you said this, I decided to > > see if it worked. And it did. It is a pretty neat way to create > > alarms inside a shell script. Almost forgot - you might enjoy looking at the "trap" command in bash (and other shells). Allows entry to arbitrary routines based on asynchronous events, similar to signal handling in "C". Receiving function has the choice of resetting the trap, issuing arbitrary actions and signals, setting other traps, etc. Fun stuff. > <snip> -- Bill
- Previous message: [CentOS] Re: command to ensure other command does last longer than5 seconds
- Next message: [CentOS] Re: command to ensure other command does last longer than5 seconds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list