authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-02-05 21:03:33-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2019-02-05 21:03:33-05:00
logfd28b9d5013fe27f8885e117b8d410f3be462c56
treeef5b134cb715a0a110d6c0365bb683b66fa704fd
parentac4e38226b45081dfb66f006bba38b11c121ad45
parent6860db66fed86de6cea57134c12374905abac8d8
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #1919 from Sahnvour/windows-childprocess

Better behaviour of ChildProcess under windows.

1 files changed, 4 insertions(+), 1 deletions(-)

std/os/child_process.zig+4-1
......@@ -600,7 +600,7 @@ pub const ChildProcess = struct {
600600 const joined_path = try os.path.join(self.allocator, search_path, app_name);
601601 defer self.allocator.free(joined_path);
602602
603 const joined_path_w = try unicode.utf8ToUtf16LeWithNull(self.allocator, app_name);
603 const joined_path_w = try unicode.utf8ToUtf16LeWithNull(self.allocator, joined_path);
604604 defer self.allocator.free(joined_path_w);
605605
606606 if (windowsCreateProcess(joined_path_w.ptr, cmd_line_w.ptr, envp_ptr, cwd_w_ptr, &siStartInfo, &piProcInfo)) |_| {
......@@ -610,6 +610,9 @@ pub const ChildProcess = struct {
610610 } else {
611611 return err;
612612 }
613 } else {
614 // Every other error would have been returned earlier.
615 return error.FileNotFound;
613616 }
614617 };
615618