sh: Make sure to process SIGINT if SETINTON re-enables processing.

If INTON re-enables interrupts, it processes any interrupt that occurred
while interrupts were disabled. Make SETINTON do the same.
This commit is contained in:
Jilles Tjoelker 2017-06-04 21:58:02 +00:00
parent 9086b30bc4
commit 8d4cde8e6d

View File

@ -73,7 +73,7 @@ extern volatile sig_atomic_t intpending;
#define INTOFF suppressint++
#define INTON { if (--suppressint == 0 && intpending) onint(); }
#define is_int_on() suppressint
#define SETINTON(s) suppressint = (s)
#define SETINTON(s) do { suppressint = (s); if (suppressint == 0 && intpending) onint(); } while (0)
#define FORCEINTON {suppressint = 0; if (intpending) onint();}
#define SET_PENDING_INT intpending = 1
#define CLEAR_PENDING_INT intpending = 0