fork - create new process
Synopsis
Description
#include <std.h>
pid_t fork(void);
The fork() system call creates a new process, whose initial open files and virtual address space are a copy of fork()s calling process. It is the single mechanism for creating a new process under VSTa.On return, fork() returns 0 in the child process, the childs PID in the parent process, or -1 in the parent process if the child could not be created.
It is legal to call fork() while more than one thread exists under the current process. Only a single thread, starting at the address of the thread which invoked fork(), will exist in the new process.
FORK (2) |