diff --git a/src/c/luv_c_type_descriptions.ml b/src/c/luv_c_type_descriptions.ml index 4ea7af07..e0a31372 100644 --- a/src/c/luv_c_type_descriptions.ml +++ b/src/c/luv_c_type_descriptions.ml @@ -671,6 +671,8 @@ struct let windows_hide = constant "UV_PROCESS_WINDOWS_HIDE" int let windows_hide_console = constant "UV_PROCESS_WINDOWS_HIDE_CONSOLE" int let windows_hide_gui = constant "UV_PROCESS_WINDOWS_HIDE_GUI" int + let windows_file_path_exact_name = + constant "UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME" int end module Redirection = diff --git a/src/c/shims.h b/src/c/shims.h index 92633d72..abf51107 100644 --- a/src/c/shims.h +++ b/src/c/shims.h @@ -803,4 +803,6 @@ { return ENOSYS; } + + #define UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME 0 #endif diff --git a/src/feature/detect_features.ml b/src/feature/detect_features.ml index e3c8c278..ce337a83 100644 --- a/src/feature/detect_features.ml +++ b/src/feature/detect_features.ml @@ -285,6 +285,7 @@ let () = needs 14 "prioritized" "See [`PRIORITIZED] in {!Luv.Poll.Event.t}."; needs 24 "process_windows_hide_console" "See {!Luv.Process.spawn}."; needs 24 "process_windows_hide_gui" "See {!Luv.Process.spawn}."; + needs 48 "process_windows_file_path_exact_name" "See {!Luv.Process.spawn}."; needs 33 "random" "See {!Luv.Random.random}."; needs 28 "readdir" "See {!Luv.File.readdir}."; needs 45 "setaffinity" "See {!Luv.Thread.setaffinity}."; diff --git a/src/process.ml b/src/process.ml index c1e3e368..4673f070 100644 --- a/src/process.ml +++ b/src/process.ml @@ -105,6 +105,7 @@ let spawn ?windows_hide ?windows_hide_console ?windows_hide_gui + ?windows_file_path_exact_name path arguments = let loop = Loop.or_default loop in @@ -167,6 +168,7 @@ let spawn |> maybe_flag windows_hide Flag.windows_hide |> maybe_flag windows_hide_console Flag.windows_hide_console |> maybe_flag windows_hide_gui Flag.windows_hide_gui + |> maybe_flag windows_file_path_exact_name Flag.windows_file_path_exact_name in let redirections, redirection_count = build_redirection_array redirect in diff --git a/src/process.mli b/src/process.mli index 023c6717..2e141cce 100644 --- a/src/process.mli +++ b/src/process.mli @@ -87,6 +87,7 @@ val spawn : ?windows_hide:bool -> ?windows_hide_console:bool -> ?windows_hide_gui:bool -> + ?windows_file_path_exact_name:bool -> string -> string list -> (t, Error.t) result @@ -117,12 +118,14 @@ val spawn : process, and redirect them to [/dev/null] or [nul]. [?windows_hide_console] and [?windows_hide_gui] have no effect on libuv - prior to 1.24.0. + prior to 1.24.0. [?windows_file_path_exact_name] has no effect on libuv + prior to 1.48.0. {{!Luv.Require} Feature checks}: - [Luv.Require.(has process_windows_hide_console)] - - [Luv.Require.(has process_windows_hide_gui)] *) + - [Luv.Require.(has process_windows_hide_gui)] + - [Luv.Require.(has process_windows_file_path_exact_name)] *) val disable_stdio_inheritance : unit -> unit (** Disables (tries) file descriptor inheritance for inherited descriptors.