Pvfork
Section: Oct. 1, 1991
(2)
Updated: MiNT Programmer's Manual
Index
Return to Main Contents
NAME
Pvfork - create a copy of the current process
SYNOPSIS
WORD Pvfork();
DESCRIPTION
Pvfork
creates a copy of the current process. Both the child
(the new process created) and the parent (the process which first made the
call) share the same address space, i.e. any changes that the
child makes to variables will also be noticed by the parent.
The new process begins execution with an apparent return from the
Pvfork
call.
Because the two processes share the same address space, including the same
stack, there could be many problems if they actually were running at the
same time. Therefore, the parent process is suspended until the child
process either exits or uses mode 200 of
Pexec
to overlay itself with a new program in a new address space.
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),
Pfork(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.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURNS
-
- SEE ALSO
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 09:01:40 GMT, February 14, 2025