From owner-svn-src-projects@freebsd.org Sat Sep 3 00:47:56 2016 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E185BCE6C7 for ; Sat, 3 Sep 2016 00:47:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E25AC12B; Sat, 3 Sep 2016 00:47:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u830ltnY086000; Sat, 3 Sep 2016 00:47:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u830lt4T085999; Sat, 3 Sep 2016 00:47:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201609030047.u830lt4T085999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 3 Sep 2016 00:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r305314 - projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2016 00:47:56 -0000 Author: ngie Date: Sat Sep 3 00:47:54 2016 New Revision: 305314 URL: https://svnweb.freebsd.org/changeset/base/305314 Log: Don't dedupe signals less than SIGRTMIN FreeBSD always delivers all signals sent with sigqueue, except when dealing with low memory conditions according to kib (see bug # 212173 comment # 5). In collaboration with: kib PR: 212173 Sponsored by: EMC / Isilon Storage Division Modified: projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c Modified: projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c ============================================================================== --- projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c Sat Sep 3 00:27:41 2016 (r305313) +++ projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c Sat Sep 3 00:47:54 2016 (r305314) @@ -151,6 +151,23 @@ sigorder(int *ordered, const int *tosend if (len == 1) return len; +#ifdef __FreeBSD__ + /* + * Don't dedupe signal numbers (bug 212173) + * + * Per kib's comment.. + * + * " + * OTOH, FreeBSD behaviour is to treat all signals as realtime while + * there is no mem shortage and siginfo can be allocated. In + * particular, signals < SIGRTMIN are not collapsed when queued more + * than once. + * " + */ + + return len; +#else + size_t i, j; for (i = 0, j = 0; i < len - 1; i++) { if (ordered[i] >= SIGRTMIN) @@ -164,6 +181,7 @@ sigorder(int *ordered, const int *tosend ordered[i + 1] = ordered[j]; } return i + 1; +#endif } ATF_TC(sigqueue_rt);