<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sys/unix/process/process_unix.rs, branch 1.53.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.53.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.53.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-03-29T20:37:24+00:00</updated>
<entry>
<title>Simplify Command::spawn (no semantic change)</title>
<updated>2021-03-29T20:37:24+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2021-03-15T20:35:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=68dbdfb5bf481790625c5f797a6837c82a1bbefb'/>
<id>urn:sha1:68dbdfb5bf481790625c5f797a6837c82a1bbefb</id>
<content type='text'>
This minimizes the size of an unsafe block, and allows outdenting some
complex code.
</content>
</entry>
<entry>
<title>Rollup merge of #83462 - ijackson:exitstatus-message-wording, r=joshtriplett</title>
<updated>2021-03-27T16:33:15+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>huyuumi.dev@gmail.com</email>
</author>
<published>2021-03-27T16:33:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3f41fdd2ebb323f83e38b0cbd7b04229fda2c69a'/>
<id>urn:sha1:3f41fdd2ebb323f83e38b0cbd7b04229fda2c69a</id>
<content type='text'>
ExitStatus: print "exit status: {}" rather than "exit code: {}" on unix

Proper Unix terminology is "exit status" (vs "wait status").  "exit
code" is imprecise on Unix and therefore unclear.  (As far as I can
tell, "exit code" is correct terminology on Windows.)

This new wording is unfortunately inconsistent with the identifier
names in the Rust stdlib.

It is the identifier names that are wrong, as discussed at length in eg
  https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html
  https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html

Unfortunately for API stability reasons it would be a lot of work, and
a lot of disruption, to change the names in the stdlib (eg to rename
`std::process::ExitStatus` to `std::process::ChildStatus` or
something), but we should fix the message output.  Many (probably
most) readers of these messages about exit statuses will be users and
system administrators, not programmers, who won't even know that Rust
has this wrong terminology.

So I think the right thing is to fix the documentation (as I have
already done) and, now, the terminology in the implementation.

This is a user-visible change to the behaviour of all Rust programs
which run Unix subprocesses.  Hopefully no-one is matching against the
exit status string, except perhaps in tests.
</content>
</entry>
<entry>
<title>ExitStatus: print "exit status: {}" rather than "exit code: {}"</title>
<updated>2021-03-25T10:27:53+00:00</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2021-03-25T10:27:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=11e40ce240d884303bee142a727decaeeef43bdb'/>
<id>urn:sha1:11e40ce240d884303bee142a727decaeeef43bdb</id>
<content type='text'>
Proper Unix terminology is "exit status" (vs "wait status").  "exit
code" is imprecise on Unix and therefore unclear.  (As far as I can
tell, "exit code" is correct terminology on Windows.)

This new wording is unfortunately inconsistent with the identifier
names in the Rust stdlib.

It is the identifier names that are wrong, as discussed at length in eg
  https://doc.rust-lang.org/nightly/std/process/struct.ExitStatus.html
  https://doc.rust-lang.org/nightly/std/os/unix/process/trait.ExitStatusExt.html

Unfortunately for API stability reasons it would be a lot of work, and
a lot of disruption, to change the names in the stdlib (eg to rename
`std::process::ExitStatus` to `std::process::ChildStatus` or
something), but we should fix the message output.  Many (probably
most) readers of these messages about exit statuses will be users and
system administrators, not programmers, who won't even know that Rust
has this wrong terminology.

So I think the right thing is to fix the documentation (as I have
already done) and, now, the terminology in the implementation.

This is a user-visible change to the behaviour of all Rust programs
which run Unix subprocesses.  Hopefully no-one is matching against the
exit status string, except perhaps in tests.

Signed-off-by: Ian Jackson &lt;ijackson@chiark.greenend.org.uk&gt;
</content>
</entry>
<entry>
<title>Rollup merge of #83353 - m-ou-se:io-error-avoid-alloc, r=nagisa</title>
<updated>2021-03-24T00:52:29+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>dylan.dpc@gmail.com</email>
</author>
<published>2021-03-24T00:52:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a42e62fa0a59d0ba620889f97513929a113a6fbd'/>
<id>urn:sha1:a42e62fa0a59d0ba620889f97513929a113a6fbd</id>
<content type='text'>
Add internal io::Error::new_const to avoid allocations.

This makes it possible to have a io::Error containing a message with zero allocations, and uses that everywhere to avoid the *three* allocations involved in `io::Error::new(kind, "message")`.

The function signature isn't perfect, because it needs a reference to the `&amp;str`. So for now, this is just a `pub(crate)` function. Later, we'll be able to use `fn new_const&lt;MSG: &amp;'static str&gt;(kind: ErrorKind)` to make that a bit better. (Then we'll also be able to use some ZST trickery if that would result in more efficient code.)

See https://github.com/rust-lang/rust/issues/83352
</content>
</entry>
<entry>
<title>Use io::Error::new_const everywhere to avoid allocations.</title>
<updated>2021-03-21T19:22:38+00:00</updated>
<author>
<name>Mara Bos</name>
<email>m-ou.se@m-ou.se</email>
</author>
<published>2021-03-21T19:22:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7b71719faf5ba6a230d097fddb288f79ccc570f1'/>
<id>urn:sha1:7b71719faf5ba6a230d097fddb288f79ccc570f1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert "Revert "use RWlock when accessing os::env #81850""</title>
<updated>2021-03-14T18:10:34+00:00</updated>
<author>
<name>The8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2021-03-14T18:10:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e22143c075c7aee0a3a5bc90b51adff6cd250b34'/>
<id>urn:sha1:e22143c075c7aee0a3a5bc90b51adff6cd250b34</id>
<content type='text'>
This reverts commit acdca316c3d42299d31c1b47eb792006ffdfc29c.
</content>
</entry>
<entry>
<title>Rollup merge of #82949 - the8472:forget-envlock-on-fork, r=joshtriplett</title>
<updated>2021-03-10T16:55:43+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>dylan.dpc@gmail.com</email>
</author>
<published>2021-03-10T16:55:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d01648b60e74ae12e990b0858e68023504b9bd29'/>
<id>urn:sha1:d01648b60e74ae12e990b0858e68023504b9bd29</id>
<content type='text'>
Do not attempt to unlock envlock in child process after a fork.

This implements the first two points from https://github.com/rust-lang/rust/issues/64718#issuecomment-793030479

This is a breaking change for cases where the environment is accessed in a Command::pre_exec closure. Except for single-threaded programs these uses were not correct anyway since they aren't async-signal safe.

Note that we had a ui test that explicitly tried `env::set_var` in `pre_exec`. As expected it failed with these changes when I tested locally.
</content>
</entry>
<entry>
<title>Rollup merge of #82411 - ijackson:fix-exitstatus, r=dtolnay</title>
<updated>2021-03-09T23:01:27+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>huyuumi.dev@gmail.com</email>
</author>
<published>2021-03-09T23:01:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=74e74e9df88d34cf4077afcaac9321cf5eb1a58d'/>
<id>urn:sha1:74e74e9df88d34cf4077afcaac9321cf5eb1a58d</id>
<content type='text'>
Fixes to ExitStatus and its docs

* On Unix, properly display every possible wait status (and don't panic on weird values)
* In the documentation, be clear and consistent about "exit status" vs "wait status".
</content>
</entry>
<entry>
<title>Do not attempt to unlock envlock in child process after a fork.</title>
<updated>2021-03-09T21:14:07+00:00</updated>
<author>
<name>The8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2021-03-09T20:42:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d854789ce191be25f2953c60fd50ce711776d9eb'/>
<id>urn:sha1:d854789ce191be25f2953c60fd50ce711776d9eb</id>
<content type='text'>
This is a breaking change for cases where the environment is
accessed in a Command::pre_exec closure. Except for
single-threaded programs these uses were not correct
anyway since they aren't async-signal safe.
</content>
</entry>
<entry>
<title>Revert "use RWlock when accessing os::env #81850"</title>
<updated>2021-03-07T19:32:42+00:00</updated>
<author>
<name>Eric Huss</name>
<email>eric@huss.org</email>
</author>
<published>2021-03-07T19:32:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=acdca316c3d42299d31c1b47eb792006ffdfc29c'/>
<id>urn:sha1:acdca316c3d42299d31c1b47eb792006ffdfc29c</id>
<content type='text'>
This reverts commit 354f19cf2475148994954b6783341620c7445071, reversing
changes made to 0cfba2fd090834c909d5ed9deccdee8170da791b.
</content>
</entry>
</feed>
