fork

Function fork 

Source
pub unsafe extern "system" fn fork() -> pid_t
Expand description

fork() creates a new process by duplicating the calling process. The new process is referred to as the child process. The calling process is referred to as the parent process.

§RETURN VALUE

On success, the PID of the child process is returned in the parent, and 0 is returned in the child. On failure, -1 is returned in the parent, no child process is created, and errno is set to indicate the error.

§ERRORS

EAGAIN(35), ENOMEM(12), ENOSYS(78), ERESTARTNOINTR(513), etc.

Read the docs here