From a769735f82e69518119adecc753f599df91d50f9 Mon Sep 17 00:00:00 2001 From: Sylvain78 Date: Tue, 9 Apr 2024 14:54:14 +0000 Subject: [PATCH] Haiku : execve not allowed if other pthreads have already been created Signed-off-by: Sylvain78 --- otherlibs/stdune/src/proc.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/otherlibs/stdune/src/proc.ml b/otherlibs/stdune/src/proc.ml index fe7e4bc66d5..e3232a6b69b 100644 --- a/otherlibs/stdune/src/proc.ml +++ b/otherlibs/stdune/src/proc.ml @@ -11,9 +11,7 @@ let restore_cwd_and_execve prog argv ~env = (* run at_exit before changing the working directory *) Stdlib.do_at_exit (); Sys.chdir (Path.External.to_string Path.External.initial_cwd); - let os_haiku = Sys.os_type == "BeOS" || (try ignore(Sys.getenv "BE_HOST_CPU");true with Not_found -> false) - in - if Sys.win32 || os_haiku + if Sys.win32 || Platform.OS.value == Platform.OS.Haiku then ( let pid = Unix.create_process_env prog argv env Unix.stdin Unix.stdout Unix.stderr in match snd (Unix.waitpid [] pid) with