summaryrefslogtreecommitdiffstats
path: root/man2/fork.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/fork.2')
-rw-r--r--man2/fork.225
1 files changed, 14 insertions, 11 deletions
diff --git a/man2/fork.2 b/man2/fork.2
index 9ef7d3584..607a86bd0 100644
--- a/man2/fork.2
+++ b/man2/fork.2
@@ -16,7 +16,7 @@
.\" Greatly expanded, to describe all attributes that differ
.\" parent and child.
.\"
-.TH fork 2 2023-02-05 "Linux man-pages 6.03"
+.TH fork 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
fork \- create a child process
.SH LIBRARY
@@ -259,14 +259,7 @@ hardware without a Memory-Management Unit).
.\" commit 4a2c7a7837da1b91468e50426066d988050e4d56
System call was interrupted by a signal and will be restarted.
(This can be seen only during a trace.)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
-Under Linux,
-.BR fork ()
-is implemented using copy-on-write pages, so the only penalty that it incurs
-is the time and memory required to duplicate the parent's page tables,
-and to create a unique task structure for the child.
+.SH VERSIONS
.SS C library/kernel differences
Since glibc 2.3.3,
.\" nptl/sysdeps/unix/sysv/linux/fork.c
@@ -291,6 +284,16 @@ The glibc wrapper invokes any fork handlers that have been
established using
.BR pthread_atfork (3).
.\" and does some magic to ensure that getpid(2) returns the right value.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.SH NOTES
+Under Linux,
+.BR fork ()
+is implemented using copy-on-write pages, so the only penalty that it incurs
+is the time and memory required to duplicate the parent's page tables,
+and to create a unique task structure for the child.
.SH EXAMPLES
See
.BR pipe (2)
@@ -305,12 +308,12 @@ for more examples.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(void)
{
pid_t pid;
-
+\&
if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
perror("signal");
exit(EXIT_FAILURE);