From owner-svn-src-head@FreeBSD.ORG Sun Nov 16 05:05:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92CD1C49; Sun, 16 Nov 2014 05:05:19 +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 8058A7DE; Sun, 16 Nov 2014 05:05:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAG55Jmi055206; Sun, 16 Nov 2014 05:05:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAG55JRP055205; Sun, 16 Nov 2014 05:05:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411160505.sAG55JRP055205@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 16 Nov 2014 05:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274571 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:05:19 -0000 Author: ngie Date: Sun Nov 16 05:05:18 2014 New Revision: 274571 URL: https://svnweb.freebsd.org/changeset/base/274571 Log: Use _exit instead of exit so the file descriptors aren't flushed twice in the child processes Submitted by: pho Modified: head/contrib/netbsd-tests/lib/libpthread/t_fork.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_fork.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_fork.c Sun Nov 16 04:13:44 2014 (r274570) +++ head/contrib/netbsd-tests/lib/libpthread/t_fork.c Sun Nov 16 05:05:18 2014 (r274571) @@ -61,7 +61,11 @@ print_pid(void *arg) thread_survived = 1; if (parent != getpid()) { +#ifdef __FreeBSD__ + _exit(1); +#else exit(1); +#endif } return NULL; } @@ -95,7 +99,11 @@ ATF_TC_BODY(fork, tc) ATF_REQUIRE_EQ_MSG(WEXITSTATUS(status), 0, "thread survived in child"); } else { sleep(5); +#ifdef __FreeBSD__ + _exit(thread_survived ? 1 : 0); +#else exit(thread_survived ? 1 : 0); +#endif } }