From owner-svn-src-all@freebsd.org Fri Jan 13 08:48:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C220CCAB188; Fri, 13 Jan 2017 08:48:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 91E361624; Fri, 13 Jan 2017 08:48:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0D8mKVR054567; Fri, 13 Jan 2017 08:48:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D8mKoj054566; Fri, 13 Jan 2017 08:48:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701130848.v0D8mKoj054566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 13 Jan 2017 08:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r312040 - stable/11/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: stable-11 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.23 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: Fri, 13 Jan 2017 08:48:21 -0000 Author: ngie Date: Fri Jan 13 08:48:20 2017 New Revision: 312040 URL: https://svnweb.freebsd.org/changeset/base/312040 Log: MFC r311268: Clarify lifetime of child(..) function Ensure child exits when complete as it's always run in a forked process. Add a missing break statement in :pselect_sigmask when calling child(..) for clarity and to avoid weird domino effects if the child process somehow does something it's not supposed to do with the logfiles, file descriptors, etc CID: 1223369, 1223370, 1300301 Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_select.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_select.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_select.c Fri Jan 13 08:48:17 2017 (r312039) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_select.c Fri Jan 13 08:48:20 2017 (r312040) @@ -135,6 +135,9 @@ child(const struct timespec *ts) "after timeout %s != %s", prmask(&nset, nbuf, sizeof(nbuf)), prmask(&oset, obuf, sizeof(obuf))); +#ifdef __FreeBSD__ + _exit(0); +#endif } ATF_TC(pselect_sigmask); @@ -154,6 +157,9 @@ ATF_TC_BODY(pselect_sigmask, tc) switch (pid = fork()) { case 0: child(NULL); +#ifdef __FreeBSD__ + break; +#endif case -1: err(1, "fork"); default: