From 12facb013304a6be6e3cc64ec5f9f31a8527c224 Mon Sep 17 00:00:00 2001 From: Kamal Marhubi Date: Wed, 30 Mar 2016 00:42:51 -0400 Subject: unistd: Add pause(2) --- src/unistd.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/unistd.rs') 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}; -- cgit v1.2.3