TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:2829] run program for a while, then kill



The kill %% tells the shell to kill it's current process (most recently
started child).  The new background job would be a child of a different
shell, so it wouldn't be killed. 

On Wed, 16 Dec 1998, Richard Seymour wrote:

> Just curious about somethine here. What if (during the three minutes)
> another job is started in the background? Would -KILL %% kill the wrong
> job?
> 
> On Wed, 16 Dec 1998, Chris Kesler wrote:
> 
> > If I wanted to ping the list server for 3 minutes, I could go
> > 
> > csh -c "ping real-time.com &; sleep 3m; kill -KILL %%"