diff options
author | jilles <jilles@FreeBSD.org> | 2012-07-15 11:18:52 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2012-07-15 11:18:52 +0000 |
commit | 9ceedcafff12732205b7c0d0e3b5ba276aa2fe39 (patch) | |
tree | 6ac4609ab27b4189d0293bfffe9fc69885c74a73 /bin | |
parent | 5895ece053a21721a1371e3a69f09495923140c7 (diff) | |
download | FreeBSD-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.c | 2 |
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; } |