summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkurt <>2008-04-04 19:30:41 +0000
committerkurt <>2008-04-04 19:30:41 +0000
commitd1031d50623e71c1ec734e02b7cd61ec97899d9f (patch)
tree01e1a943c4fa680941b1889187d5052873974e38
parentfe435898d593343d7d9fdc31aa597c1c40026222 (diff)
downloadopenbsd-d1031d50623e71c1ec734e02b7cd61ec97899d9f.tar.gz
openbsd-d1031d50623e71c1ec734e02b7cd61ec97899d9f.tar.bz2
openbsd-d1031d50623e71c1ec734e02b7cd61ec97899d9f.zip
- do not call pthread_atfork(3) handlers when a multithreaded program
calls vfork(2). "untested, but looks OK" marc@ - document vfork(2), popen(3) and system(3) don't call atfork handlers in multithreaded programs. okay jmc@
-rw-r--r--src/lib/libc/stdlib/system.39
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/system.3 b/src/lib/libc/stdlib/system.3
index 338d3bfa83..a49e595bc0 100644
--- a/src/lib/libc/stdlib/system.3
+++ b/src/lib/libc/stdlib/system.3
@@ -29,9 +29,9 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: system.3,v 1.10 2007/05/31 19:19:32 jmc Exp $ 32.\" $OpenBSD: system.3,v 1.11 2008/04/04 19:30:41 kurt Exp $
33.\" 33.\"
34.Dd $Mdocdate: May 31 2007 $ 34.Dd $Mdocdate: April 4 2008 $
35.Dt SYSTEM 3 35.Dt SYSTEM 3
36.Os 36.Os
37.Sh NAME 37.Sh NAME
@@ -66,6 +66,11 @@ Otherwise,
66.Fn system 66.Fn system
67returns the termination status of the shell in the format specified by 67returns the termination status of the shell in the format specified by
68.Xr waitpid 2 . 68.Xr waitpid 2 .
69.Pp
70Note that fork handlers established using
71.Xr pthread_atfork 3
72are not called when a multithreaded program calls
73.Fn system .
69.Sh RETURN VALUES 74.Sh RETURN VALUES
70If a child process cannot be created, or the termination status of 75If a child process cannot be created, or the termination status of
71the shell cannot be obtained, 76the shell cannot be obtained,