bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash cannot kill itself?


From: Chet Ramey
Subject: Re: Bash cannot kill itself?
Date: Wed, 30 Jun 2010 08:12:35 -0400

> > It does not work as I expected. The running script was not terminated after
> > 5 seconds. So what's wrong here?
> 
> The shell is waiting for foreground process (sleep) to finish.  During
> this time no other process will be started by the shell.

Yes.  The trap is not taken until after the foreground process has completed.
If you run sleep in the background and use `wait', the signal will interrupt
it.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]