Date: Sat, 3 Sep 2016 00:47:55 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> 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 Message-ID: <201609030047.u830lt4T085999@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609030047.u830lt4T085999>