summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2012-07-15 11:18:52 +0000
committerjilles <jilles@FreeBSD.org>2012-07-15 11:18:52 +0000
commit9ceedcafff12732205b7c0d0e3b5ba276aa2fe39 (patch)
tree6ac4609ab27b4189d0293bfffe9fc69885c74a73 /bin
parent5895ece053a21721a1371e3a69f09495923140c7 (diff)
downloadFreeBSD-src-9ceedcafff12732205b7c0d0e3b5ba276aa2fe39.zip
FreeBSD-src-9ceedcafff12732205b7c0d0e3b5ba276aa2fe39.tar.gz
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.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/trap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/trap.c b/bin/sh/trap.c
index 834992f..94cf129 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;
}
OpenPOWER on IntegriCloud