Date: Thu, 23 Oct 2014 06:24:37 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273522 - head/contrib/netbsd-tests/lib/libc/sys Message-ID: <201410230624.s9N6Obiq039505@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410230624.s9N6Obiq039505>