Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

vfork - generate new process in virtual memory

&pagelevel(4)&pagelevel

Syntax

#include <unistd.h>

pid_t vfork (void);

Description

vfork() is mapped to fork(). See the relevant section for a description.

Return val.

0 or PID

if successful. 0 is returned to the child process, and the process ID of the child process is returned to the parent process.


-1

to the parent process if an error occurs. No child process is generated. errno is set to indicate the error.

Errors

vfork() will fail if

EAGAIN

The system-dependent limit to the maximum number of processes possible throughout the system or per user was exceeded.
These limits are defined when the system is generated.


ENOMEM

The swap area is not large enough for the new process.

See also

exec(), exit(), fork(), wait(), unistd.h.