Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
fork(2)
Edit
PageHistory
Diff
Info
LikePages
You are viewing an old revision of this page.
View the current version
.
FORK !!!FORK NAME SYNOPSIS DESCRIPTION RETURN VALUE ERRORS CONFORMING TO SEE ALSO ---- !!NAME fork - create a child process !!SYNOPSIS __#include __ #include __ __pid_t fork(void);__ !!DESCRIPTION __fork__ creates a child process that differs from the parent process only in its PID and PPID, and in the fact that resource utilizations are set to 0. File locks and pending signals are not inherited. Under Linux, __fork__ is implemented using copy-on-write pages, so the only penalty incurred by fork is the time and memory required to duplicate the parent's page tables, and to create a unique task structure for the child. !!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 ''errno'' will be set appropriately. !!ERRORS __EAGAIN__ __fork__ cannot allocate sufficient memory to copy the parent's page tables and allocate a task structure for the child. __ENOMEM__ __fork__ failed to allocate the necessary kernel structures because memory is tight. !!CONFORMING TO The __fork__ call conforms to SVr4, SVID, POSIX, X/OPEN, BSD 4.3. !!SEE ALSO clone(2), execve(2), vfork(2), wait(2) ----
50 pages link to
fork(2)
:
ZombieProcess
EFAULT
fcntl(2)
vfork(2)
pclose(3)
perlfunc(1)
Man2f
sysklogd(8)
CopyOnWrite
_exit(2)
EAGAIN
Fork
csh(1)
daemon(3)
epic4(1)
execl(3)
execle(3)
execlp(3)
execv(3)
execvp(3)
execve(2)
irc(1)
pipe(2)
semop(2)
setpriority(2)
shmat(2)
shmdt(2)
shmop(2)
strace(1)
syscalls(2)
mlock(2)
clone(2)
flock(2)
creat(2)
exit(2)
getpid(2)
getppid(2)
getpriority(2)
mmap(2)
exec(3)
open(2)
mlockall(2)
munmap(2)
popen(3)
ptrace(2)
named(8)
NetworkProgrammingOld
nice(2)
AntVsMake
PageFault
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.