vfork() - spawn a new process efficiently, sharing virtual memory
#include <unistd.h>
pid_t vfork(void)
The vfork(2) call creates a new process, just as fork(2) does, but it doesn't fully copy the address space of the parent process. By sharing the space, process creation is much faster in a paged environment. Normally, vfork(2) is a faster way to create a new process before an exec-family call.
However, the greater speed has a greater risk to the parent process if the child process does not immediately exec(2) or _exit(2). (Leaving with exit(3) isn't recommened because exit(3) flushes and closes the I/O data structures of the parent.)
On success, vfork(2) call returns with 0 to the child process and it returns the process ID of the child process to the parent process. If the call fails, it returns -1 to the parent process, does not create a new process, and sets errno to indicate the error.
The vfork(2) call can fail for the following reasons:
exec(2)
exit(3)
fork(2)
wait(2)
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.