rust/src
bors 3f4227af13 Auto merge of #31409 - alexcrichton:command-exec, r=aturon
These commits are an implementation of https://github.com/rust-lang/rfcs/pull/1359 which is tracked via https://github.com/rust-lang/rust/issues/31398. The `before_exec` implementation fit easily with the current process spawning framework we have, but unfortunately the `exec` implementation required a bit of a larger refactoring. The stdio handles were all largely managed as implementation details of `std::process` and the `exec` function lived in `std::sys`, so the two didn't have access to one another.

I took this as a sign that a deeper refactoring was necessary, and I personally feel that the end result is cleaner for both Windows and Unix. The commits should be separated nicely for reviewing (or all at once if you're feeling ambitious), but the changes made here were:

* The process spawning on Unix was refactored in to a pre-exec and post-exec function. The post-exec function isn't allowed to do any allocations of any form, and management of transmitting errors back to the parent is managed by the pre-exec function (as it's the one that actually forks).
* Some management of the exit status was pushed into platform-specific modules. On Unix we must cache the return value of `wait` as the pid is consumed after we wait on it, but on Windows we can just keep querying the system because the handle stays valid.
* The `Stdio::None` variant was renamed to `Stdio::Null` to better reflect what it's doing.
* The global lock on `CreateProcess` is now correctly positioned to avoid unintended inheritance of pipe handles that other threads are sending to their child processes. After a more careful reading of the article referenced the race is not in `CreateProcess` itself, but rather the property that handles are unintentionally shared.
* All stdio management now happens in platform-specific modules. This provides a cleaner implementation/interpretation for `FromFraw{Fd,Handle}` for each platform as well as a cleaner transition from a configuration to what-to-do once we actually need to do the spawn.

With these refactorings in place, implementing `before_exec` and `exec` ended up both being pretty trivial! (each in their own commit)
2016-02-10 22:51:43 +00:00
..
compiler-rt@b6087e82ba Update compiler-rt 2015-11-07 00:26:44 +08:00
compiletest Add emscripten support to compiletest 2016-02-06 20:56:31 +00:00
doc Rollup merge of #31514 - cgar:spelling, r=alexcrichton 2016-02-09 16:58:59 -05:00
driver
error-index-generator
etc Auto merge of #31410 - rkruppe:issue31109, r=pnkfelix 2016-02-06 13:16:03 +00:00
grammar Fix whitespace alignment 2015-12-24 21:39:38 -05:00
jemalloc@e24a1a025a Downgrade bundled jemalloc version 2016-01-20 09:38:16 -08:00
liballoc Auto merge of #31397 - bradfirj:arc-docfix, r=steveklabnik 2016-02-08 22:19:41 +00:00
liballoc_jemalloc Remove "powerpc64le" and "mipsel" target_arch 2016-02-01 20:39:07 -08:00
liballoc_system Add the asmjs-unknown-emscripten triple. Add cfgs to libs. 2016-02-06 20:56:14 +00:00
libarena mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
libbacktrace Minor spelling fixes 2016-02-09 11:52:39 -05:00
libcollections Auto merge of #31420 - bluss:deque-equality, r=Gankro 2016-02-10 10:04:46 +00:00
libcollectionstest Auto merge of #31420 - bluss:deque-equality, r=Gankro 2016-02-10 10:04:46 +00:00
libcore Rollup merge of #31520 - steveklabnik:doc_num, r=alexcrichton 2016-02-09 16:58:59 -05:00
libcoretest Auto merge of #31410 - rkruppe:issue31109, r=pnkfelix 2016-02-06 13:16:03 +00:00
libflate mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
libfmt_macros mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
libgetopts Register new snapshots 2015-12-21 09:26:21 -08:00
libgraphviz mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
liblibc@a64ee24718 std: Add a helper for symbols that may not exist 2016-02-05 17:11:02 -08:00
liblog mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
librand Fix warnings during tests 2016-01-26 09:29:28 -08:00
librbml Minor spelling fixes 2016-02-09 11:52:39 -05:00
librustc Auto merge of #31523 - steveklabnik:rollup, r=steveklabnik 2016-02-09 22:28:45 +00:00
librustc_back rustc: Use llvm-ar for custom targets by default 2016-02-08 10:27:03 -08:00
librustc_bitflags mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
librustc_borrowck Rollup merge of #31270 - ruud-v-a:improve-e0507, r=steveklabnik 2016-02-02 00:32:18 -05:00
librustc_data_structures Auto merge of #31349 - nikomatsakis:issue-31157-obligation-forest-cache, r=aturon 2016-02-05 17:16:03 +00:00
librustc_driver Auto merge of #31499 - kamalmarhubi:cfg-flag-invalid-cfgs, r=brson 2016-02-10 14:24:41 +00:00
librustc_front Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson 2016-01-26 22:10:10 +00:00
librustc_lint Improve detection of unused imports 2016-02-03 23:39:08 +00:00
librustc_llvm Remove old #[allow(trivial_casts)] annotations 2016-02-08 09:35:09 -08:00
librustc_metadata make MirMap a struct instead of a type alias for NodeMap 2016-02-09 16:53:42 +01:00
librustc_mir Auto merge of #31465 - nagisa:mir-free-fix, r=nikomatsakis 2016-02-10 04:34:15 +00:00
librustc_passes Instrument a bunch of tasks that employ the HIR map in one way or 2016-02-05 13:19:55 -05:00
librustc_platform_intrinsics mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
librustc_plugin Allow registering MIR-passes through compiler plugins 2016-02-09 16:53:43 +01:00
librustc_privacy mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
librustc_resolve Instrument a bunch of tasks that employ the HIR map in one way or 2016-02-05 13:19:55 -05:00
librustc_trans Auto merge of #31523 - steveklabnik:rollup, r=steveklabnik 2016-02-09 22:28:45 +00:00
librustc_typeck Minor spelling fixes 2016-02-09 11:52:39 -05:00
librustc_unicode docs: Standardize on 'Errors' header in std docs 2016-02-01 21:41:29 -05:00
librustdoc Rustdoc - display since version for stable items 2016-02-09 21:20:41 -05:00
libserialize Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brson 2016-01-26 22:10:10 +00:00
libstd Auto merge of #31409 - alexcrichton:command-exec, r=aturon 2016-02-10 22:51:43 +00:00
libsyntax Breaking tokens into pieces should behave similar to Parser::bump. 2016-02-08 21:26:48 +01:00
libsyntax_ext remove dead #[derive(FromPrimitive)] code 2016-02-03 21:26:02 -05:00
libterm mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
libtest Add the asmjs-unknown-emscripten triple. Add cfgs to libs. 2016-02-06 20:56:14 +00:00
llvm@de5c31045d Add doctests for directionality 2016-02-02 00:32:09 -05:00
rt Abort on stack overflow instead of re-raising SIGSEGV 2016-02-05 20:41:18 -05:00
rtstartup Register new snapshots 2015-12-21 09:26:21 -08:00
rust-installer@c37d3747da
rustbook std: Stabilize APIs for the 1.7 release 2016-01-16 11:03:10 -08:00
rustllvm Auto merge of #30962 - Amanieu:non_volatile_atomic, r=alexcrichton 2016-02-04 02:46:44 +00:00
test Auto merge of #31409 - alexcrichton:command-exec, r=aturon 2016-02-10 22:51:43 +00:00
snapshots.txt Fixes #30628 by adding new snapshot for dragonfly bsd 2016-01-08 09:37:14 -08:00