Function origin::fork[][src]

pub unsafe fn fork() -> Result<Option<Pid>>
Expand description

Creates a new process by duplicating the calling process.

Safety

After a fork in a multithreaded process returns in the child, data structures such as mutexes might be in an unusable state. code should use at_fork to either protect them, from being used by other threads during the fork, or reinitialize them in child process.