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:
parent
e0e00a4d0f
commit
fa7ccda2c4
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user