diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-04-21 13:12:30 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-04-21 13:27:11 -0400 |
| commit | bee1ae68ef1d36db8f4dfe255bef70b8ca6c4568 (patch) | |
| tree | 066910a1dc9400e4810af04742503c3d448b6c80 /std/os | |
| parent | 3a137c6ff0f3f0fe02db9d0fa152a1894e9db493 (diff) | |
| download | zig-bee1ae68ef1d36db8f4dfe255bef70b8ca6c4568.tar.gz zig-bee1ae68ef1d36db8f4dfe255bef70b8ca6c4568.zip | |
std: fix PATH resolution when spawning child
Diffstat (limited to 'std/os')
| -rw-r--r-- | std/os/index.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/os/index.zig b/std/os/index.zig index 60e3c9a9b8..e9c182dafa 100644 --- a/std/os/index.zig +++ b/std/os/index.zig @@ -304,7 +304,7 @@ pub fn posixExecve(exe_path: []const u8, argv: []const []const u8, env_map: &con mem.copy(u8, path_buf, search_path); path_buf[search_path.len] = '/'; mem.copy(u8, path_buf[search_path.len + 1 ...], exe_path); - path_buf[search_path.len + exe_path.len + 2] = 0; + path_buf[search_path.len + exe_path.len + 1] = 0; err = posix.getErrno(posix.execve(path_buf.ptr, argv_buf.ptr, envp_buf.ptr)); assert(err > 0); if (err == errno.EACCES) { |
