authorgravatar for 3811822-hoanga@users.noreply.gitlab.comAl Hoang <3811822-hoanga@users.noreply.gitlab.com> 2021-05-22 00:56:30-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-24 10:39:01-07:00
logdb8eae65dece402438e5e48dd0d1c8c4fc8f5b1c
tree864660f6a248cef8e320d1935385671a98b2d0eb
parent8cebbc352ab7ec324891fec222f317f02aba45d7

avoid usage of execv on Haiku


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

lib/std/process.zig+4-1
...@@ -800,7 +800,10 @@ pub fn getSelfExeSharedLibPaths(allocator: *Allocator) error{OutOfMemory}![][:0]...@@ -800,7 +800,10 @@ pub fn getSelfExeSharedLibPaths(allocator: *Allocator) error{OutOfMemory}![][:0]
800}800}
801801
802/// Tells whether calling the `execv` or `execve` functions will be a compile error.802/// Tells whether calling the `execv` or `execve` functions will be a compile error.
803pub const can_execv = std.builtin.os.tag != .windows;803pub const can_execv = switch (builtin.os.tag) {
804 .windows, .haiku => false,
805 else => true,
806};
804807
805pub const ExecvError = std.os.ExecveError || error{OutOfMemory};808pub const ExecvError = std.os.ExecveError || error{OutOfMemory};
806809