Differences between version 4 and revision by previous author of fork(2).
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 4 | Last edited on Tuesday, November 5, 2002 3:02:57 pm | by JohnMcPherson | Revert |
Older page: | version 2 | Last edited on Sunday, November 3, 2002 10:34:52 pm | by WikiAdmin | Revert |
@@ -18,9 +18,9 @@
;[EAGAIN]: fork(2) cannot allocate sufficient memory to copy the parent's page tables and allocate a task structure for the child, or the number of processors would exceed the limit of the number of processes either system wide, or for a particular users. (CHILD_MAX)
;[ENOMEM]: fork(2) failed to allocate the necessary kernel structures because memory is tight.
!!CONFORMING TO
-The fork(2) call conforms to SVr4, SVID, POSIX, X/OPEN, BSD 4.3.
+The fork(2) call conforms to SVr4, SVID, [
POSIX]
, X/OPEN, BSD 4.3.
!!EXAMPLE
/*
* This program demonstrates fork(2).
@@ -64,7 +64,9 @@
}
}
return 0;
}
+
+Note that on a machine with a single [CPU], this will output large groups of "aaaaa...." followed by large groups of "bbbb..." as each process gets a timeslice. On a machine with more than one CPU, you might be more likely to see "a" and "b" interspersed in smaller units as both processes can run at the same time.
!!SEE ALSO
clone(2), execve(2), vfork(2), wait(2)