summaryrefslogtreecommitdiff
path: root/src/unistd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/unistd.rs')
-rw-r--r--src/unistd.rs7
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};