28 lines
1.3 KiB
HTML
28 lines
1.3 KiB
HTML
<html><!-- This HTML file has been created by texi2html 1.29
|
|
from syscalls.texi on 4 June 1994 -->
|
|
|
|
<TITLE>Syscall specifications of Linux - fork</TITLE>
|
|
<P>Go to the <A HREF="syscalls_58.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_58.html">previous</A>, <A HREF="syscalls_60.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_60.html">next</A> section.<P>
|
|
<H2><A NAME="SEC59" HREF="syscalls_toc.html#SEC59" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC59">template</A></H2>
|
|
<P>
|
|
<H3>SYNOPSIS</H3>
|
|
<P>
|
|
<CODE>pid_t fork(void);</CODE>
|
|
<P>
|
|
<CODE>pid_t vfork(void);</CODE>
|
|
<P>
|
|
<H3>DESCRIPTION</H3>
|
|
<P>
|
|
Create a child task from the current task. The new task is an exact copy
|
|
of the parent appart from the PID. <CODE>vfork</CODE> is simply an alias for
|
|
<CODE>fork</CODE>.
|
|
<P>
|
|
<H3>RETURN VALUE</H3>
|
|
<P>
|
|
On success, the call returns the PID of the new task in the parent and
|
|
returns 1 in the child. On error, returns -1 and sets <CODE>errno</CODE> to the
|
|
following value: <CODE>EAGAIN</CODE> meaning that there is not enough memory
|
|
to complete the call.
|
|
<P>
|
|
<P>Go to the <A HREF="syscalls_58.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_58.html">previous</A>, <A HREF="syscalls_60.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_60.html">next</A> section.<P>
|