| Age | Commit message (Collapse) | Author | Lines |
|
`.raw_os_error()` (called in `spawn()`) returned None, so this produced an incorrect error.
|
|
|
|
redox: handle multiple paths in PATH
|
|
|
|
fn Path::new<S: AsRef ...>(s: &S) -> &Path
Signed-off-by: NODA, Kai <nodakai@gmail.com>
|
|
`Stdio` now implements `From<ChildStdin>`, `From<ChildStdout>`,
`From<ChildStderr>`, and `From<File>`.
The `Command::stdin`/`stdout`/`stderr` methods now take any type that
implements `Into<Stdio>`.
This makes it much easier to write shell-like command chains, piping to
one another and redirecting to and from files. Otherwise one would need
to use the unsafe and OS-specific `from_raw_fd` or `from_raw_handle`.
|
|
instead of dup
|
|
As of last year with version 'Sierra', the Mac operating system is now
called 'macOS'.
|
|
This is much nicer for callers who want to short-circuit real I/O errors
with `?`, because they can write this
if let Some(status) = foo.try_wait()? {
...
} else {
...
}
instead of this
match foo.try_wait() {
Ok(status) => {
...
}
Err(err) if err.kind() == io::ErrorKind::WouldBlock => {
...
}
Err(err) => return Err(err),
}
The original design of `try_wait` was patterned after the `Read` and
`Write` traits, which support both blocking and non-blocking
implementations in a single API. But since `try_wait` is never blocking,
it makes sense to optimize for the non-blocking case.
Tracking issue: https://github.com/rust-lang/rust/issues/38903
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|