[Bug 189] ash behaves strangely on CTRL-C (does not exit but fills process table)

bugzilla at busybox.net bugzilla at busybox.net
Thu Mar 19 09:59:48 UTC 2009


--- Comment #8 from Ronald Wahl <ronald.wahl at raritan.com>  2009-03-19 09:59:48 UTC ---
Your fix (like mine) does fix the problem if only one signal is pending
(SIGINT). I understand that there might be scenarios where the signal handlers
for other signals should be handled before we are killed with SIGINT.

The problem with intpending=1 and pendingsig!=0 is that in this case the CTRL-C
is lost because dotrap() might be called before raise_interrupt() is called
which ends in the same broken scenario described. You can easily see this when
you follow these steps:

(1) Modify the script to have an handler for USR1 which does just a "return 0".
(2) Start the script.
(3) Stop the script with CTRL-Z.
(4) Send SIGUSR1 to the script.
(5) Send SIGINT to the script _and_ the sleep command.
(6) Continue the script with "fg".

Now you'll see the broken behavior again. Same happens if (4) and (5) are

I tried to skip resetting gotsig[SIGINT-1] in dotrap() when sigpending is 1 but
this ends in a loop. But maybe you know how to do it better...

Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the busybox-cvs mailing list