diff options
author | Kamal Marhubi <kamal@marhubi.com> | 2016-03-30 00:42:51 -0400 |
---|---|---|
committer | Kamal Marhubi <kamal@marhubi.com> | 2016-03-30 00:42:51 -0400 |
commit | 12facb013304a6be6e3cc64ec5f9f31a8527c224 (patch) | |
tree | 474b3aba427fde151da2d67ad98e5eaa175b285f /src/unistd.rs | |
parent | 4eb5918737d7a72fcff0654b4c92c9862051fc00 (diff) | |
download | nix-12facb013304a6be6e3cc64ec5f9f31a8527c224.zip |
unistd: Add pause(2)
Diffstat (limited to 'src/unistd.rs')
-rw-r--r-- | src/unistd.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/unistd.rs b/src/unistd.rs index 5d57afd1..6fca804d 100644 --- a/src/unistd.rs +++ b/src/unistd.rs @@ -356,6 +356,13 @@ pub fn setgid(gid: gid_t) -> Result<()> { Errno::result(res).map(drop) } +#[inline] +pub fn pause() -> Result<()> { + let res = unsafe { libc::pause() }; + + Errno::result(res).map(drop) +} + #[cfg(any(target_os = "linux", target_os = "android"))] mod linux { use sys::syscall::{syscall, SYSPIVOTROOT}; |