package shell
Yet another implementation of fork&exec and related functionality
Install
Dune Dependency
Authors
Maintainers
Sources
shell-v0.16.0.tar.gz
sha256=1e267e9120dc73c7dc94598f68b209622e64942f916dd1c1d3285f2a9fcab214
doc/shell.low_level_process/Low_level_process/index.html
Module Low_level_process
Source
Low-level process handling
This is low-level enough that you should probably be using Shell
instead to dispatch processes.
Source
val kill :
?is_child:bool ->
?wait_for:Core.Time_float.Span.t ->
?signal:Core.Signal.t ->
Core.Pid.t ->
unit
kills a process by sending signal
; waiting for wait_for
and then sending a sigkill
. You need to set is_child to true when killing child processes or run waitpid on them in another.
caveat: is_child:false
(the default) is racy: it can both send signals to wrong processes and it can also fail to notice that the target died.
Source
val run :
?timeout:Core.Time_float.Span.t ->
?use_extra_path:bool ->
?working_dir:string ->
?setuid:int ->
?setgid:int ->
?env:
[ `Extend of (string * string) list | `Replace of (string * string) list ] ->
?input:string ->
?keep_open:bool ->
?stdoutf:(Core.Bytes.t -> int -> unit) ->
?stderrf:(Core.Bytes.t -> int -> unit) ->
?tail_len:int ->
prog:string ->
args:string list ->
unit ->
Command_result.t
Runs the process.
stdoutf s len
and stderrf s len
should only inspect the String.subo s ~len
component of s
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>