svn commit: r305314 - projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/sys
Ngie Cooper
ngie at FreeBSD.org
Sat Sep 3 00:47:56 UTC 2016
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);
More information about the svn-src-projects
mailing list