Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Feb 2010 13:59:13 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 174236 for review
Message-ID:  <201002031359.o13DxDsX061151@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=174236

Change 174236 by rwatson@rwatson_vimage_client on 2010/02/03 13:58:36

	Use _exit(0) not exit(0) after fork, or I/O may be flushed more than
	once.

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#11 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/tools/tools/syscall_timing/syscall_timing.c#11 (text+ko) ====

@@ -371,7 +371,7 @@
 	if (pid < 0)
 		err(-1, "test_fork: fork");
 	if (pid == 0)
-		exit(0);
+		_exit(0);
 	if (waitpid(pid, NULL, 0) < 0)
 		err(-1, "test_fork: waitpid");
 	benchmark_start();
@@ -380,7 +380,7 @@
 		if (pid < 0)
 			err(-1, "test_fork: fork");
 		if (pid == 0)
-			exit(0);
+			_exit(0);
 		if (waitpid(pid, NULL, 0) < 0)
 			err(-1, "test_fork: waitpid");
 	}
@@ -397,7 +397,7 @@
 	if (pid < 0)
 		err(-1, "test_vfork: vfork");
 	if (pid == 0)
-		exit(0);
+		_exit(0);
 	if (waitpid(pid, NULL, 0) < 0)
 		err(-1, "test_vfork: waitpid");
 	benchmark_start();
@@ -406,7 +406,7 @@
 		if (pid < 0)
 			err(-1, "test_vfork: vfork");
 		if (pid == 0)
-			exit(0);
+			_exit(0);
 		if (waitpid(pid, NULL, 0) < 0)
 			err(-1, "test_vfork: waitpid");
 	}
@@ -424,7 +424,7 @@
 	if (pid < 0)
 		err(-1, "test_pdfork: pdfork");
 	if (pid == 0)
-		exit(0);
+		_exit(0);
 	pollfd.fd = fd;
 	pollfd.events = POLLHUP;
 	pollfd.revents = 0;
@@ -441,7 +441,7 @@
 		if (pid < 0)
 			err(-1, "test_pdfork: pdfork");
 		if (pid == 0)
-			exit(0);
+			_exit(0);
 		pollfd.fd = fd;
 		pollfd.events = POLLHUP;
 		pollfd.revents = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002031359.o13DxDsX061151>