Fork: Difference between revisions

Content added Content deleted
(Add rust example (tested on linux/OS X))
Line 1,302: Line 1,302:
=={{header|Rust}}==
=={{header|Rust}}==
This uses the nix(0.15) crate. The code has been tested on Linux, OS X.
This uses the nix(0.15) crate. The code has been tested on Linux, OS X.
{{libheader|nix}}<lang rust>use nix::unistd::{fork, ForkResult};
<lang rust>use nix::unistd::{fork, ForkResult};
use std::process::id;
use std::process::id;


Line 1,321: Line 1,321:
This is the new process(pid: 88651).
This is the new process(pid: 88651).
</lang>
</lang>

=={{header|Scala}}==
=={{header|Scala}}==
{{libheader|Scala}}
{{libheader|Scala}}