Skip to content

Commit 132eecc

Browse files
Merge pull request async-rs#1 from paulavery-forks/feat/proces
2 parents 7971002 + 623dc45 commit 132eecc

File tree

3 files changed

+490
-14
lines changed

3 files changed

+490
-14
lines changed

src/os/unix/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ cfg_std! {
77
cfg_default! {
88
pub mod fs;
99
pub mod net;
10+
pub mod process;
1011
}

src/os/unix/process.rs

+17
Original file line numberDiff line numberDiff line change
@@ -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+
7+
cfg_docs! {
8+
/// Unix-specific extensions to [`process::ExitStatus`].
9+
pub trait ExitStatusExt {
10+
/// Creates a new `ExitStatus` from the raw underlying `i32` return value of
11+
/// 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

Comments
 (0)