From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/FUNCTIONS/fork.html | 88 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 reference/C/FUNCTIONS/fork.html (limited to 'reference/C/FUNCTIONS/fork.html') diff --git a/reference/C/FUNCTIONS/fork.html b/reference/C/FUNCTIONS/fork.html new file mode 100644 index 0000000..0601423 --- /dev/null +++ b/reference/C/FUNCTIONS/fork.html @@ -0,0 +1,88 @@ +fork function + + + + +
+
+

fork function

+
+
+fork spawns a copy of the running process. The copy (or child) +has a copy of the parent process stack, data area and heap and starts +execution after the fork statement. fork is of use when you wish to +write daemon processes. +

+


+
+ + + + +
+
+
+	Library:   unistd.h
+
+	Prototype: pid_t fork(void);
+
+	Syntax:    pid_t PID
+
+                   PID = fork();
+
+
+
+

+On completion, PID will have one of the following values: + +

+ > 0 == the childs process ID.
+   0 == is returned to the child process.
+ < 0 == an error occoured. No child created, errno is set to 
+        indicate the problem
+
+
+

Examples:

+ + example +program. + +
+

See Also:

+ + +pipe function.

+ + +execl function.

+ + +threads

+ + +

+ +


+

+

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ + -- cgit v1.2.3-54-g00ecf