[−][src]Function user::syscall::fork
pub fn fork() -> i32
Fork current process.
Child process will get return value of 0.
Parent process (the one calling fork
) will
get pid of child process.
Examples
use user::syscall::fork; if fork() == 0 { println!("subprocess!"); } else { println!("parent process"); }