Pfork
Section: Oct. 1, 1991
(2)
Updated: MiNT Programmer's Manual
Index
Return to Main Contents
NAME
Pfork - create a copy of the current process
SYNOPSIS
WORD Pfork();
DESCRIPTION
Pfork
creates a copy of the current process. The child
(the new process created) inherits a copy of the parent's address
space, not the parent's original memory, and so changes to variables
in the child do not affect the parent in any way.
The new process begins execution with an apparent return from the
Pfork
call.
RETURNS
0 in the child
The new process id (a positive number), in the parent.
ENSMEM if there is not enough memory to create the new process.
SEE ALSO
Pexec(2),
Pvfork(2)
BUGS
If the parent is in supervisor mode when this call is made, the child will
be started in user mode anyway; thus, it is strongly recommended that this
call be made only from user mode.
The current implementation of
Pfork
acts like
Pvfork
in that the parent is suspended until the child either exits or overlays
itself with
Pexec
mode 200. Do not rely on this behavior, as it will be changed in future
versions of MiNT.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURNS
-
- SEE ALSO
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 16:01:23 GMT, March 03, 2023