Skip to content

Commit

Permalink
Haiku : execve not allowed if other pthreads have already been created
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain78 <sylvain_kerjean@hotmail.com>
  • Loading branch information
Sylvain78 committed Sep 24, 2024
1 parent 89a4ace commit a769735
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions otherlibs/stdune/src/proc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a769735

Please sign in to comment.