Module Integration.InferSubprocess

val run : ?cwd:string -> prog:string -> argv:string list -> unit -> (unit, string) IStdlib.IStd.Result.t

Spawn an infer subprocess with a sanitized environment.

The INFER_ARGS env var is stripped of internal child-process flags (e.g. --run-as-child) so workers spawned from a ProcessPool do not inherit them. stdin and stdout are redirected to /dev/null; stderr is inherited. Optionally cwd sets the working directory of the child. Returns Ok () on success, or Error msg describing the failure.