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
This commit is contained in:
Jilles Tjoelker 2012-03-26 17:05:26 +00:00
parent 8f47851dab
commit 91792417bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233516

View File

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