<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/sys/windows/process.rs, branch 1.26.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.26.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.26.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2018-03-21T16:54:33+00:00</updated>
<entry>
<title>Deprecate the AsciiExt trait in favor of inherent methods</title>
<updated>2018-03-21T16:54:33+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-03-17T11:15:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c09b9f937250db0f51b705a3110f8cffdad083bb'/>
<id>urn:sha1:c09b9f937250db0f51b705a3110f8cffdad083bb</id>
<content type='text'>
The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.

Fixes https://github.com/rust-lang/rust/issues/39658
</content>
</entry>
<entry>
<title>Move process::ExitCode internals to sys</title>
<updated>2018-03-04T02:44:44+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2018-03-04T02:29:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=74c5c6e6cb0425284f57fece6fbf248e827ea06d'/>
<id>urn:sha1:74c5c6e6cb0425284f57fece6fbf248e827ea06d</id>
<content type='text'>
Now begins the saga of fixing compilation errors on other platforms...
</content>
</entry>
<entry>
<title>Capture environment at spawn</title>
<updated>2017-12-24T14:24:31+00:00</updated>
<author>
<name>Diggory Blake</name>
<email>diggsey@googlemail.com</email>
</author>
<published>2017-12-17T15:21:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ccc91d7b4873a50678b3f65c895290915c54f6f5'/>
<id>urn:sha1:ccc91d7b4873a50678b3f65c895290915c54f6f5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove import of now unused AsciiExt</title>
<updated>2017-11-04T18:16:03+00:00</updated>
<author>
<name>Lukas Kalbertodt</name>
<email>lukas.kalbertodt@gmail.com</email>
</author>
<published>2017-11-03T20:24:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=deb7360fa7838aa718b5a599460761aeb940b89e'/>
<id>urn:sha1:deb7360fa7838aa718b5a599460761aeb940b89e</id>
<content type='text'>
I also replaced a wildcard import with a specific one, while I was
at it.
</content>
</entry>
<entry>
<title>Add conversions from File and Child* handles to Stdio</title>
<updated>2017-06-06T22:42:55+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2017-06-06T22:42:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9debe91675222782e08fbb15bb6359a05bf85131'/>
<id>urn:sha1:9debe91675222782e08fbb15bb6359a05bf85131</id>
<content type='text'>
`Stdio` now implements `From&lt;ChildStdin&gt;`, `From&lt;ChildStdout&gt;`,
`From&lt;ChildStderr&gt;`, and `From&lt;File&gt;`.

The `Command::stdin`/`stdout`/`stderr` methods now take any type that
implements `Into&lt;Stdio&gt;`.

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`.
</content>
</entry>
<entry>
<title>Always quote program name in Command::spawn on Windows</title>
<updated>2017-06-04T20:47:24+00:00</updated>
<author>
<name>Oliver Middleton</name>
<email>olliemail27@gmail.com</email>
</author>
<published>2017-06-04T20:47:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7afcf51fe4f635ff4e864ee13085397b41880fa6'/>
<id>urn:sha1:7afcf51fe4f635ff4e864ee13085397b41880fa6</id>
<content type='text'>
`CreateProcess` will interpret args as part of the binary name if it
doesn't find the binary using just the unquoted name. For example if
`foo.exe` doesn't exist, `Command::new("foo").arg("bar").spawn()` will
try to launch `foo bar.exe` which is clearly not desired.
</content>
</entry>
<entry>
<title>std: Don't cache stdio handles on Windows</title>
<updated>2017-03-23T14:22:48+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2017-03-14T05:27:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5ca8a735ca36219abbf601624606c41148b95210'/>
<id>urn:sha1:5ca8a735ca36219abbf601624606c41148b95210</id>
<content type='text'>
This alters the stdio code on Windows to always call `GetStdHandle` whenever the
stdio read/write functions are called as this allows us to track changes to the
value over time (such as if a process calls `SetStdHandle` while it's running).

Closes #40490
</content>
</entry>
<entry>
<title>make Child::try_wait return io::Result&lt;Option&lt;ExitStatus&gt;&gt;</title>
<updated>2017-02-07T04:04:47+00:00</updated>
<author>
<name>Jack O'Connor</name>
<email>oconnor663@gmail.com</email>
</author>
<published>2017-02-03T22:39:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2a345bbcc1e6332241883f784896ea93d2a7ccb3'/>
<id>urn:sha1:2a345bbcc1e6332241883f784896ea93d2a7ccb3</id>
<content type='text'>
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) =&gt; {
            ...
        }
        Err(err) if err.kind() == io::ErrorKind::WouldBlock =&gt; {
            ...
        }
        Err(err) =&gt; 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
</content>
</entry>
<entry>
<title>Auto merge of #38866 - alexcrichton:try-wait, r=aturon</title>
<updated>2017-01-09T07:01:10+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2017-01-09T07:01:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7aab3d38a07a89663d1e35f1fd86d7b4659dcef2'/>
<id>urn:sha1:7aab3d38a07a89663d1e35f1fd86d7b4659dcef2</id>
<content type='text'>
std: Add a nonblocking `Child::try_wait` method

This commit adds a new method to the `Child` type in the `std::process` module
called `try_wait`. This method is the same as `wait` except that it will not
block the calling thread and instead only attempt to collect the exit status. On
Unix this means that we call `waitpid` with the `WNOHANG` flag and on Windows it
just means that we pass a 0 timeout to `WaitForSingleObject`.

Currently it's possible to build this method out of tree, but it's unfortunately
tricky to do so. Specifically on Unix you essentially lose ownership of the pid
for the process once a call to `waitpid` has succeeded. Although `Child` tracks
this state internally to be resilient to multiple calls to `wait` or a `kill`
after a successful wait, if the child is waited on externally then the state
inside of `Child` is not updated. This means that external implementations of
this method must be extra careful to essentially not use a `Child`'s methods
after a call to `waitpid` has succeeded (even in a nonblocking fashion).

By adding this functionality to the standard library it should help canonicalize
these external implementations and ensure they can continue to robustly reuse
the `Child` type from the standard library without worrying about pid ownership.
</content>
</entry>
<entry>
<title>std: Add a nonblocking `Child::try_wait` method</title>
<updated>2017-01-07T05:20:39+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2017-01-06T06:47:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=abb91890831d71f5cbe4346a9ab57d432372df65'/>
<id>urn:sha1:abb91890831d71f5cbe4346a9ab57d432372df65</id>
<content type='text'>
This commit adds a new method to the `Child` type in the `std::process` module
called `try_wait`. This method is the same as `wait` except that it will not
block the calling thread and instead only attempt to collect the exit status. On
Unix this means that we call `waitpid` with the `WNOHANG` flag and on Windows it
just means that we pass a 0 timeout to `WaitForSingleObject`.

Currently it's possible to build this method out of tree, but it's unfortunately
tricky to do so. Specifically on Unix you essentially lose ownership of the pid
for the process once a call to `waitpid` has succeeded. Although `Child` tracks
this state internally to be resilient to multiple calls to `wait` or a `kill`
after a successful wait, if the child is waited on externally then the state
inside of `Child` is not updated. This means that external implementations of
this method must be extra careful to essentially not use a `Child`'s methods
after a call to `waitpid` has succeeded (even in a nonblocking fashion).

By adding this functionality to the standard library it should help canonicalize
these external implementations and ensure they can continue to robustly reuse
the `Child` type from the standard library without worrying about pid ownership.
</content>
</entry>
</feed>
