Date: Mon, 9 Apr 2012 22:01:43 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r234073 - stable/9/lib/libthr/thread Message-ID: <201204092201.q39M1h4L080348@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Mon Apr 9 22:01:43 2012 New Revision: 234073 URL: http://svn.freebsd.org/changeset/base/234073 Log: MFC r233516: 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. Modified: stable/9/lib/libthr/thread/thr_sig.c Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/9/lib/libthr/thread/thr_sig.c Mon Apr 9 21:58:58 2012 (r234072) +++ stable/9/lib/libthr/thread/thr_sig.c Mon Apr 9 22:01:43 2012 (r234073) @@ -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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204092201.q39M1h4L080348>