We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7971002 + 623dc45 commit 132eeccCopy full SHA for 132eecc
src/os/unix/mod.rs
@@ -7,4 +7,5 @@ cfg_std! {
7
cfg_default! {
8
pub mod fs;
9
pub mod net;
10
+ pub mod process;
11
}
src/os/unix/process.rs
@@ -0,0 +1,17 @@
1
+//! Unix-specific extensions to primitives in the `std::process` module.
2
+
3
+cfg_not_docs! {
4
+ pub use std::os::unix::process::ExitStatusExt;
5
+}
6
+cfg_docs! {
+ /// Unix-specific extensions to [`process::ExitStatus`].
+ pub trait ExitStatusExt {
+ /// Creates a new `ExitStatus` from the raw underlying `i32` return value of
+ /// a process.
12
+ fn from_raw(raw: i32) -> Self;
13
14
+ /// If the process was terminated by a signal, returns that signal.
15
+ fn signal(&self) -> Option<i32>;
16
+ }
17
0 commit comments