summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sys/wait.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sys/wait.rs b/src/sys/wait.rs
index a6bccd8a..9252609b 100644
--- a/src/sys/wait.rs
+++ b/src/sys/wait.rs
@@ -16,7 +16,7 @@ bitflags!(
}
);
-#[derive(Clone, Copy)]
+#[derive(Eq, PartialEq, Clone, Copy, Debug)]
pub enum WaitStatus {
Exited(pid_t),
StillAlive
@@ -42,3 +42,7 @@ pub fn waitpid(pid: pid_t, options: Option<WaitPidFlag>) -> Result<WaitStatus> {
Ok(Exited(res))
}
}
+
+pub fn wait() -> Result<WaitStatus> {
+ waitpid(-1, None)
+}