Annotation of 43BSDTahoe/man/man3f/fork.3, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1983 Regents of the University of California.
                      2: .\" All rights reserved.  The Berkeley software License Agreement
                      3: .\" specifies the terms and conditions for redistribution.
                      4: .\"
                      5: .\"    @(#)fork.3f     6.2 (Berkeley) 5/27/86
                      6: .\"
                      7: .TH FORK 3F "May 27, 1986"
                      8: .UC 5
                      9: .SH NAME
                     10: fork \- create a copy of this process
                     11: .SH SYNOPSIS
                     12: .B integer function fork()
                     13: .SH DESCRIPTION
                     14: .I Fork
                     15: creates a copy of the calling process.
                     16: The only distinction between the 2 processes is that the value
                     17: returned to one of them (referred to as the `parent' process)
                     18: will be the process id of the copy.
                     19: The copy is usually referred to as the `child' process.
                     20: The value returned to the `child' process will be zero.
                     21: .PP
                     22: All logical units open for writing are flushed before the fork to avoid
                     23: duplication of the contents of I/O buffers in the external file(s).
                     24: .PP
                     25: If the returned value is negative, it indicates an error and will be
                     26: the negation of the system error code.
                     27: See perror(3F).
                     28: .PP
                     29: A corresponding
                     30: .I exec
                     31: routine has not been provided because there is no satisfactory way to
                     32: retain open logical units across the exec.
                     33: However, the usual function of
                     34: .I fork/exec
                     35: can be performed using
                     36: .IR system (3F).
                     37: .if 0 \{
                     38: A pipe can be opened to another process using the f77
                     39: .B open
                     40: statement with
                     41: .sp 1
                     42: .ti +5
                     43: .B "file=\(fm\fIprocess\fB\(fm, status=\(fmpipe\(fm, access=\(fmread\(fm"
                     44: .br
                     45: or
                     46: .br
                     47: .ti +5
                     48: .B "file=\(fm\fIprocess\fB\(fm, status=\(fmpipe\(fm, access=\(fmwrite\(fm"
                     49: \}
                     50: .SH FILES
                     51: .ie \nM /usr/ucb/lib/libU77.a
                     52: .el /usr/lib/libU77.a
                     53: .SH "SEE ALSO"
                     54: fork(2), wait(3F), kill(3F), system(3F), perror(3F)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.