module Daemonize:sig
..end
LONG_RUNNING
API with nohup setsid
unix
processes or generated Python scripts.LONG_RUNNING
API with nohup setsid
unix
processes or generated Python scripts.Ketrew.Long_running.LONG_RUNNING
plugin-API.
Shell commands are put in a Ketrew_pure.Monitored_script.t
, and
run in the background (detached in a new process group).
There are two methods for starting/detaching the computation
(set with the ~using
parameter):
`Nohup_setsid
(the default) means that the script will be started with
"nohup setsid bash <script> &"
.
This method is the POSIX-ly portable one; but, sadly,
it is broken on MacOSX
(c.f. people having
TMux problems,
Nohup problems).`Python_daemon
means that the script will be started by
a generated Python script.
Obviously, this works only when the host can run Python scripts (which
includes MacOSX).update
function uses the log-file of the monitored-script, and the
command "ps -p <Group-PID>"
.
The kill
function kills the process group (created thanks to "setsid"
)
with "kill -- <N>"
(where "<N>"
is the negative PID of the group).
type
run_parameters
val run_parameters_to_yojson : run_parameters -> Yojson.Safe.json
val run_parameters_of_yojson : Yojson.Safe.json ->
run_parameters Ppx_deriving_yojson_runtime.error_or
include Long_running.LONG_RUNNING
val create : ?starting_timeout:float ->
?call_script:(string -> string list) ->
?using:[ `Nohup_setsid | `Python_daemon ] ->
?host:Ketrew_pure.Host.t ->
?no_log_is_ok:bool ->
Ketrew_pure.Program.t -> [> `Long_running of string * string ]
Ketrew_pure.Target.build_process
(run parameters
are already serialized), see Edsl.daemonize
for more
detailsval markup : run_parameters ->
Ketrew_pure.Internal_pervasives.Display_markup.t
val get_playground : run_parameters -> Ketrew_pure.Path.t option