package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dadde8cfa62be9dabd805fc190b415427b4699ffe3458c153e2f3f9cc5c9b9b4
md5=f96ac96fb0182f2b97dbe9ded452544b
doc/b0.b00/B00/Op/Spawn/index.html
Module Op.Spawn
Tool spawns.
Tool spawns
The type for spawn standard outputs redirections.
`Ui
redirects 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 befalse
on the fds.`File p
redirect the output to file pathp
.`Tee p
, is both`Ui
andFile `f
.
The list of process exit codes that indicate success. If the list is empty this any exit code.
val env : t -> B0_std.Os.Env.assignments
env s
is the environment in which s
runs.
val relevant_env : t -> B0_std.Os.Env.assignments
relevant_env s
are the assignements of env s
that should be taken into account for caching.
val cwd : t -> B0_std.Fpath.t
cwd s
is the cwd with which s
runs.
val stdin : t -> B0_std.Fpath.t option
stdin s
is the file s
uses as stdin (if any).
val success_exits : t -> success_exits
success_exits s
is the list of process exit codes s
that indicate success.
val tool : t -> B0_std.Cmd.tool
tool t
is the spawned tool. Note that this has to be a full path at that point.
val args : t -> B0_std.Cmd.t
args s
are the spawned tool arguments.
stdo_ui sr
is the standard outputs redirection contents of s
once it has executed (if any).
set_stdo_ui w ui
sets w
's standard output redirection contents to ui
.
val result : t -> (B0_std.Os.Cmd.status, string) result
result s
is the spawn result of s
.
val set_result : t -> (B0_std.Os.Cmd.status, string) result -> unit
set_result s e
the spawn result of s
to e
.
Formatters
val pp_success_exits : int list B0_std.Fmt.t
pp_success_exits
formats the success exits.
val pp_cmd : t B0_std.Fmt.t
pp_cmd
formats the command issued by the spawn.
val pp_stdo_ui : elide:bool -> t B0_std.Fmt.t
pp_stdo_ui
formats the standard output ui of the spawn. If elide
is true elides long outputs.
val pp_result : (B0_std.Os.Cmd.status, string) result B0_std.Fmt.t
pp_result
formats the command status of the spawn.
val pp : t B0_std.Fmt.t
pp
formats a spawn.