Skip to content

Commit

Permalink
unistd: Add pause(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalmarhubi committed Mar 30, 2016
1 parent 4eb5918 commit 12facb0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 12facb0

Please sign in to comment.