From owner-svn-src-all@FreeBSD.ORG Thu Oct 23 06:24:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49D36DF9; Thu, 23 Oct 2014 06:24:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 363AAFB5; Thu, 23 Oct 2014 06:24:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9N6Obc3039506; Thu, 23 Oct 2014 06:24:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9N6Obiq039505; Thu, 23 Oct 2014 06:24:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410230624.s9N6Obiq039505@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 23 Oct 2014 06:24:37 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2014 06:24:37 -0000 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();