We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2acb9e commit c2f8bb7Copy full SHA for c2f8bb7
src/unistd.rs
@@ -20,18 +20,21 @@ pub enum ForkResult {
20
}
21
22
impl ForkResult {
23
+ #[inline]
24
pub fn is_child(&self) -> bool {
25
match *self {
26
ForkResult::Child => true,
27
_ => false
28
29
30
31
32
pub fn is_parent(&self) -> bool {
33
!self.is_child()
34
35
36
37
+#[inline]
38
pub fn fork() -> Result<ForkResult> {
39
use self::ForkResult::*;
40
let res = unsafe { libc::fork() };
0 commit comments