]> git.lizzy.rs Git - rust.git/commit
native: Search the child's PATH on win32
authorAlex Crichton <alex@alexcrichton.com>
Tue, 24 Jun 2014 19:10:31 +0000 (12:10 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 13 Jul 2014 21:06:20 +0000 (14:06 -0700)
commitb1a964a9bf23c92a6b6cb5762b54e0f0f4a337d5
tree7055bf34f4196565524721fb478b5b2bfbb1d3b5
parentfbeee04f31ac16fe61f29749145a29e562d065fe
native: Search the child's PATH on win32

In order to have the spawning semantics be the same for unix/windows, the
child's PATH environment variable needs to be searched rather than the parent's
environment variable.

If the child is inheriting the parent's PATH, then no action need be taken as
windows will do the heavy lifting. If the child specifies its own PATH, then it
is searched beforehand for the target program and the result is favored if a hit
is found.

cc #15149, but does not close the issue because libgreen still needs to be
updated.
src/libnative/io/process.rs
src/test/run-pass/issue-15149.rs [new file with mode: 0644]