From fa7ccda2c434a30e76f4e7337aefaa93a3523f79 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 15 Jul 2012 11:18:52 +0000 Subject: [PATCH] sh: Reset pendingsigs before checking pending traps, not after. Otherwise, a signal arriving at exactly the right moment might not be processed until another signal arrived. --- bin/sh/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/trap.c b/bin/sh/trap.c index 834992f01e1..94cf1299184 100644 --- a/bin/sh/trap.c +++ b/bin/sh/trap.c @@ -416,6 +416,7 @@ dotrap(void) in_dotrap++; for (;;) { + pendingsigs = 0; for (i = 1; i < NSIG; i++) { if (gotsig[i]) { gotsig[i] = 0; @@ -467,7 +468,6 @@ dotrap(void) break; } in_dotrap--; - pendingsigs = 0; }