From owner-svn-src-all@FreeBSD.ORG Mon Mar 26 17:05:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50859106566C; Mon, 26 Mar 2012 17:05:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B54D8FC08; Mon, 26 Mar 2012 17:05:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2QH5R6R042464; Mon, 26 Mar 2012 17:05:27 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2QH5RPI042462; Mon, 26 Mar 2012 17:05:27 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201203261705.q2QH5RPI042462@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 26 Mar 2012 17:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233516 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 17:05:27 -0000 Author: jilles Date: Mon Mar 26 17:05:26 2012 New Revision: 233516 URL: http://svn.freebsd.org/changeset/base/233516 Log: 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 Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Mon Mar 26 16:40:45 2012 (r233515) +++ head/lib/libthr/thread/thr_sig.c Mon Mar 26 17:05:26 2012 (r233516) @@ -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)); }