From owner-svn-src-all@freebsd.org Wed Sep 9 22:54:08 2015 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 1FAA8A00F81; Wed, 9 Sep 2015 22:54:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.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 EB5EF1EE7; Wed, 9 Sep 2015 22:54:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t89Ms7QG041555; Wed, 9 Sep 2015 22:54:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t89Ms7Sx041554; Wed, 9 Sep 2015 22:54:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201509092254.t89Ms7Sx041554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 9 Sep 2015 22:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287602 - head/tests/sys/kern 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.20 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: Wed, 09 Sep 2015 22:54:08 -0000 Author: jhb Date: Wed Sep 9 22:54:07 2015 New Revision: 287602 URL: https://svnweb.freebsd.org/changeset/base/287602 Log: Use _exit() instead of exit() in child processes created during tests. Suggested by: kib Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Wed Sep 9 22:42:26 2015 (r287601) +++ head/tests/sys/kern/ptrace_test.c Wed Sep 9 22:54:07 2015 (r287602) @@ -127,7 +127,7 @@ ATF_TC_BODY(ptrace__parent_wait_after_tr /* Child process. */ trace_me(); - exit(1); + _exit(1); } /* Parent process. */ @@ -173,7 +173,7 @@ ATF_TC_BODY(ptrace__parent_wait_after_at /* Wait for the parent to attach. */ CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == 0); - exit(1); + _exit(1); } close(cpipe[1]); @@ -221,7 +221,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft /* Wait for parent to be ready. */ CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); - exit(1); + _exit(1); } close(cpipe[1]); @@ -252,7 +252,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft CHILD_REQUIRE(WIFEXITED(status)); CHILD_REQUIRE(WEXITSTATUS(status) == 1); - exit(0); + _exit(0); } close(dpipe[1]); @@ -315,7 +315,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft /* Wait for parent to be ready. */ CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); - exit(1); + _exit(1); } close(cpipe[1]); @@ -331,7 +331,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft */ CHILD_REQUIRE((fpid = fork()) != -1); if (fpid != 0) - exit(2); + _exit(2); /* Debugger process. */ close(dpipe[0]); @@ -356,7 +356,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft CHILD_REQUIRE(WIFEXITED(status)); CHILD_REQUIRE(WEXITSTATUS(status) == 1); - exit(0); + _exit(0); } close(dpipe[1]); @@ -418,14 +418,14 @@ follow_fork_parent(void) if (fpid == 0) /* Child */ - exit(2); + _exit(2); wpid = waitpid(fpid, &status, 0); CHILD_REQUIRE(wpid == fpid); CHILD_REQUIRE(WIFEXITED(status)); CHILD_REQUIRE(WEXITSTATUS(status) == 2); - exit(1); + _exit(1); } /* @@ -662,7 +662,7 @@ attach_fork_parent(int cpipe[2]) /* Double-fork to disassociate from the debugger. */ CHILD_REQUIRE((fpid = fork()) != -1); if (fpid != 0) - exit(3); + _exit(3); /* Send the pid of the disassociated child to the debugger. */ fpid = getpid();