On 9/20/16 11:04 PM, PePa wrote:
> When sourcing this script (version 1), it will print y after receiving
> an interrupt, but not in the 2 different versions (2 and 3).
>
> # version 1
> echo x
> sleep 99
> echo y
>
> # version 2
> echo x; sleep 99
> echo y
>
> # version 3
> echo x
> sleep 99; echo y
>
> Is this a bug or expected behaviour??
Well, it's definitely a difference between three simple commands and a
command list. I think the right behavior is that exhibited by versions 2
and 3: the interrupt causes the execution of the sourced script to halt.
I'll take a look at it.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/