diff options
author | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-04-12 22:42:49 +0000 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-04-12 22:42:49 +0000 |
commit | c13182efa3b3d77f2563034c8212c0ca798243ca (patch) | |
tree | e7652b26018b7c22cd6a4e4b41404dfaab911303 /man2/fork.2 | |
parent | 4174ff5658082832c2ed511720f18881b3a80a34 (diff) |
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
white space.
Diffstat (limited to 'man2/fork.2')
-rw-r--r-- | man2/fork.2 | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/man2/fork.2 b/man2/fork.2 index 5d6c762a..d437798f 100644 --- a/man2/fork.2 +++ b/man2/fork.2 @@ -12,7 +12,7 @@ .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. -.\" +.\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from @@ -20,7 +20,7 @@ .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. -.\" +.\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" @@ -48,8 +48,8 @@ fork \- create a child process .SH DESCRIPTION .BR fork () creates a new process by duplicating the calling process. -The new process, referred to as the \fIchild\fP, -is an exact duplicate of the calling process, +The new process, referred to as the \fIchild\fP, +is an exact duplicate of the calling process, referred to as the \fIparent\fP, except for the following points: .IP * 4 The child has its own unique process ID, @@ -62,7 +62,7 @@ The child does not inherit its parent's memory locks .RB ( mlock (2), .BR mlockall (2)). .IP * 4 -Process resource utilisations +Process resource utilisations .RB ( getrusage (2)) and CPU time counters .RB ( times (2)) @@ -82,30 +82,30 @@ The parent does not inherit timers from its parent .BR alarm (3), .BR timer_create (3)). .IP * 4 -The child does not inherit outstanding asynchronous I/O operations +The child does not inherit outstanding asynchronous I/O operations from its parent .RB ( aio_read (3), .BR aio_write (3)). -.PP -The process attributes in the preceding list are all specified +.PP +The process attributes in the preceding list are all specified in POSIX.1-2001. The parent and child also differ with respect to the following Linux-specific process attributes: .IP * 4 -The child does not inherit directory change notifications (dnotify) +The child does not inherit directory change notifications (dnotify) from its parent (see the description of -.B F_NOTIFY -in +.B F_NOTIFY +in .BR fcntl (2)). .IP * 4 The .BR prctl (2) .B PR_SET_PDEATHSIG -setting is reset so that the child does not receive a signal +setting is reset so that the child does not receive a signal when its parent terminates. .IP * 4 -Memory mappings that have been marked with the +Memory mappings that have been marked with the .BR madvise (2) .B MADV_DONTFORK flag are not inherited across a @@ -117,42 +117,42 @@ The termination signal of the child is always SIGCHLD .PP Note the following further points: .IP * 4 -The child process is created with a single thread \(em the -one that called +The child process is created with a single thread \(em the +one that called .BR fork (2). The entire virtual address space of the parent is replicated in the child, -including the states of mutexes, condition variables, +including the states of mutexes, condition variables, and other pthreads objects; the use of .BR pthread_atfork (3) may be helpful for dealing with problems that this can cause. .IP * 4 The child inherits copies of the parent's set of open file descriptors. -Each file descriptor in the child refers to the same +Each file descriptor in the child refers to the same open file description (see .BR open (2)) as the corresponding file descriptor in the parent. -This means that the two descriptors share open file status flags, -current file offset, +This means that the two descriptors share open file status flags, +current file offset, and signal-driven I/O attributes (see the description of .B F_SETOWN -and +and .B F_SETSIG -in +in .BR fcntl (2)). .IP * 4 -The child inherits copies of the parent's set of open message +The child inherits copies of the parent's set of open message queue descriptors (see .BR mq_overview (7)). -Each descriptor in the child refers to the same +Each descriptor in the child refers to the same open message queue description as the corresponding descriptor in the parent. This means that the two descriptors share the same flags .RI ( mq_flags ). .SH "RETURN VALUE" On success, the PID of the child process is returned in the parent's thread -of execution, and a 0 is returned in the child's thread of execution. On -failure, a \-1 will be returned in the parent's context, no child process -will be created, and +of execution, and a 0 is returned in the child's thread of execution. +On failure, a \-1 will be returned in the parent's context, +no child process will be created, and .I errno will be set appropriately. .SH ERRORS |