On 02/09, Bob Proulx wrote:
>
> Oleg Nesterov wrote:
>
> > That is why I provided another test-case, let me repeat it:
>
> Sorry but I missed seeing that the first time through or I would have
> commented.
>
> >     #!./bash
> >     perl -we '$SIG{INT} = sub {exit}; sleep'
> >     echo "Hehe, I am going to sleep after ^C"
> >     sleep 100
>
> This test case is flawed in that as written perl will eat the signal
> and ignore it.  It isn't fair to explicitly ignore the signal.

Sure! But you misunderstood. This test-case does not try to prove that
bash is buggy. Quite contrary, I created it exactly because I started
to suspect that the current behaviour is probably intentional, at least
partly.

And, it illustrates how and why the test-case with /bin/true can miss
a signal. Because, from /bin/sh pov "eat the signal and exit" does not
differ from another case: ^C races with do_exit().

Oleg.


Reply via email to