Commit 9006db1
committed
Auto merge of #42436 - ollie27:win_spawn_name, r=alexcrichton
Always quote program name in Command::spawn on Windows
[`CreateProcess`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425.aspx) 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.File tree
4 files changed
+59
-8
lines changed- src
- libstd/sys/windows
- test/run-make/windows-spawn
4 files changed
+59
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
431 | 433 | | |
432 | 434 | | |
433 | | - | |
| 435 | + | |
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
437 | | - | |
| 439 | + | |
438 | 440 | | |
439 | 441 | | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
443 | | - | |
| 445 | + | |
444 | 446 | | |
445 | 447 | | |
446 | 448 | | |
| |||
526 | 528 | | |
527 | 529 | | |
528 | 530 | | |
529 | | - | |
| 531 | + | |
530 | 532 | | |
531 | 533 | | |
532 | 534 | | |
| |||
539 | 541 | | |
540 | 542 | | |
541 | 543 | | |
542 | | - | |
| 544 | + | |
543 | 545 | | |
544 | 546 | | |
545 | 547 | | |
546 | | - | |
| 548 | + | |
547 | 549 | | |
548 | 550 | | |
549 | 551 | | |
550 | | - | |
| 552 | + | |
551 | 553 | | |
552 | 554 | | |
553 | 555 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments