diff options
author | jilles <jilles@FreeBSD.org> | 2012-03-26 17:05:26 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2012-03-26 17:05:26 +0000 |
commit | fe5a011aefe1939b68dc3597fe00a462052ea78b (patch) | |
tree | a62de8b18855d8d77041ed87bac1e4fe6148e3a0 /lib | |
parent | a19daf80bc6146f4bb36a1db4918c3b54fbbe062 (diff) | |
download | FreeBSD-src-fe5a011aefe1939b68dc3597fe00a462052ea78b.zip FreeBSD-src-fe5a011aefe1939b68dc3597fe00a462052ea78b.tar.gz |
libthr: In the atfork handlers for signals, do not skip the last signal.
_SIG_MAXSIG works a bit unexpectedly: signals 1 till _SIG_MAXSIG are valid,
both bounds inclusive.
Reviewed by: davidxu
MFC after: 1 week
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libthr/thread/thr_sig.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index 46cbd82..3dee8b7 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -458,7 +458,7 @@ _thr_signal_prefork(void) { int i; - for (i = 1; i < _SIG_MAXSIG; ++i) + for (i = 1; i <= _SIG_MAXSIG; ++i) _thr_rwl_rdlock(&_thr_sigact[i-1].lock); } @@ -467,7 +467,7 @@ _thr_signal_postfork(void) { int i; - for (i = 1; i < _SIG_MAXSIG; ++i) + for (i = 1; i <= _SIG_MAXSIG; ++i) _thr_rwl_unlock(&_thr_sigact[i-1].lock); } @@ -476,7 +476,7 @@ _thr_signal_postfork_child(void) { int i; - for (i = 1; i < _SIG_MAXSIG; ++i) + for (i = 1; i <= _SIG_MAXSIG; ++i) bzero(&_thr_sigact[i-1].lock, sizeof(struct urwlock)); } |