Module Op.Spawn
Tool spawns.
Tool spawns
type stdo=[|`Ui|`File of B0_std.Fpath.t|`Tee of B0_std.Fpath.t]The type for spawn standard outputs redirections.
`Uiredirects the output to the user interface of the build system (usually only shown in case of failure). Outputs are always first redirected to a file and read back by the program running the build on completion, this means that in the spawn programisatty(3)will befalseon the fds.`File predirect the output to file pathp.`Tee p, is both`UiandFile `f.
type success_exits= int listThe list of process exit codes that indicate success. If the list is empty this any exit code.
val env : t -> B0_std.Os.Env.assignmentsenv sis the environment in whichsruns.
val relevant_env : t -> B0_std.Os.Env.assignmentsrelevant_env sare the assignements ofenv sthat should be taken into account for caching.
val cwd : t -> B0_std.Fpath.tcwd sis the cwd with whichsruns.
val stdin : t -> B0_std.Fpath.t optionstdin sis the filesuses as stdin (if any).
val success_exits : t -> success_exitssuccess_exits sis the list of process exit codessthat indicate success.
val tool : t -> B0_std.Cmd.tooltool tis the spawned tool. Note that this has to be a full path at that point.
val args : t -> B0_std.Cmd.targs sare the spawned tool arguments.
val stdo_ui : t -> (string, string) Stdlib.result optionstdo_ui sris the standard outputs redirection contents ofsonce it has executed (if any).
val set_stdo_ui : t -> (string, string) Stdlib.result option -> unitset_stdo_ui w uisetsw's standard output redirection contents toui.
val result : t -> (B0_std.Os.Cmd.status, string) Stdlib.resultresult sis the spawn result ofs.
val set_result : t -> (B0_std.Os.Cmd.status, string) Stdlib.result -> unitset_result s ethe spawn result ofstoe.
Formatters
val pp_success_exits : int list B0_std.Fmt.tpp_success_exitsformats the success exits.
val pp_cmd : t B0_std.Fmt.tpp_cmdformats the command issued by the spawn.
val pp_stdo_ui : elide:bool -> t B0_std.Fmt.tpp_stdo_uiformats the standard output ui of the spawn. Ifelideis true elides long outputs.
val pp_result : (B0_std.Os.Cmd.status, string) Stdlib.result B0_std.Fmt.tpp_resultformats the command status of the spawn.
val pp : t B0_std.Fmt.tppformats a spawn.