svn commit: r273522 - head/contrib/netbsd-tests/lib/libc/sys

Garrett Cooper ngie at FreeBSD.org
Thu Oct 23 06:24:37 UTC 2014


Author: ngie
Date: Thu Oct 23 06:24:36 2014
New Revision: 273522
URL: https://svnweb.freebsd.org/changeset/base/273522

Log:
  - Mark unused parameters __unused in handler
  - Call sigqueue with getpid() instead of 0 -- the latter idiom appears to only
  be valid on NetBSD
  
  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c	Thu Oct 23 06:21:10 2014	(r273521)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c	Thu Oct 23 06:24:36 2014	(r273522)
@@ -46,7 +46,11 @@ static void	handler(int, siginfo_t *, vo
 static int value;
 
 static void
+#if defined(__FreeBSD__)
+handler(int signo __unused, siginfo_t *info __unused, void *data __unused)
+#else
 handler(int signo, siginfo_t *info, void *data)
+#endif
 {
 	value = info->si_value.sival_int;
 	kill(0, SIGINFO);
@@ -72,7 +76,15 @@ ATF_TC_BODY(sigqueue_basic, tc)
 
 	sv.sival_int = VALUE;
 
+#if defined(__FreeBSD__)
+	/* 
+	 * From kern_sig.c:
+	 * Specification says sigqueue can only send signal to single process.
+	 */
+	if (sigqueue(getpid(), SIGUSR1, sv) != 0)
+#else
 	if (sigqueue(0, SIGUSR1, sv) != 0)
+#endif
 		atf_tc_fail("sigqueue failed");
 
 	sched_yield();


More information about the svn-src-head mailing list