.\" 1999-11-10: Merged text taken from the page contributed by
.\" Reed H. Petty (rhp@draper.net)
.\"
-.TH VFORK 2 2009-06-21 "Linux" "Linux Programmer's Manual"
+.TH VFORK 2 2010-09-20 "Linux" "Linux Programmer's Manual"
.SH NAME
vfork \- create a child process and block parent
.SH SYNOPSIS
.in
.sp
.BR vfork ():
-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.ad l
+.RS 4
+.PD 0
+.TP 4
+Since glibc 2.12:
+.nf
+_BSD_SOURCE ||
+ (_XOPEN_SOURCE\ >=\ 500 ||
+ _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED) &&
+ !(_POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700)
+.TP 4
+.fi
+Before glibc 2.12:
+_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
+_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+.PD
+.RE
+.ad b
.SH DESCRIPTION
.SS "Standard Description"
(From POSIX.1)
It is used to create new processes without copying the page tables of
the parent process.
It may be useful in performance-sensitive applications
-where a child will be created which then immediately issues an
+where a child is created which then immediately issues an
.BR execve (2).
.PP
.BR vfork ()
However, in the bad old days a
.BR fork (2)
would require making a complete copy of the caller's data space,
-often needlessly, since usually immediately afterwards an
+often needlessly, since usually immediately afterward an
.BR exec (3)
is done.
Thus, for greater efficiency, BSD introduced the
The use of
.BR vfork ()
was tricky: for example, not modifying data
-in the parent process depended on knowing which variables are
+in the parent process depended on knowing which variables were
held in a register.
.SH "CONFORMING TO"
4.3BSD, POSIX.1-2001.