diff options
| author | bors <bors@rust-lang.org> | 2013-11-11 18:11:17 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-11 18:11:17 -0800 |
| commit | 86787f8befe0f8971f27bd15be1e16ec7aa99e7e (patch) | |
| tree | 481ca094a98776594c0810dfc5b4767d8e9fae9a /src/libstd/rt/rtio.rs | |
| parent | c0b7972f7d63e4b55098797cb48949b00d3ffee7 (diff) | |
| parent | f698decf3701cc51a61bbc3e36971898339ba91e (diff) | |
auto merge of #10109 : pcmattman/rust/pass-nonzero-exit-status-on-termination-by-signal, r=alexcrichton
The UvProcess exit callback is called with a zero exit status and non-zero termination signal when a child is terminated by a signal. If a parent checks only the exit status (for example, only checks the return value from `wait()`), it may believe the process completed successfully when it actually failed. Helpers for common use-cases are in `std::rt::io::process`. Should resolve https://github.com/mozilla/rust/issues/10062.
Diffstat (limited to 'src/libstd/rt/rtio.rs')
| -rw-r--r-- | src/libstd/rt/rtio.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rt/rtio.rs b/src/libstd/rt/rtio.rs index d623914cdad..9b1103b8a74 100644 --- a/src/libstd/rt/rtio.rs +++ b/src/libstd/rt/rtio.rs @@ -18,7 +18,7 @@ use c_str::CString; use ai = rt::io::net::addrinfo; use rt::io::IoError; use rt::io::signal::Signum; -use super::io::process::ProcessConfig; +use super::io::process::{ProcessConfig, ProcessExit}; use super::io::net::ip::{IpAddr, SocketAddr}; use path::Path; use super::io::{SeekStyle}; @@ -201,7 +201,7 @@ pub trait RtioFileStream { pub trait RtioProcess { fn id(&self) -> libc::pid_t; fn kill(&mut self, signal: int) -> Result<(), IoError>; - fn wait(&mut self) -> int; + fn wait(&mut self) -> ProcessExit; } pub trait RtioPipe { |
