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.
This commit is contained in:
Jilles Tjoelker 2012-07-15 11:18:52 +00:00
parent e0e00a4d0f
commit fa7ccda2c4

View File

@ -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;
}