Module Ketrew.Daemonize

module Daemonize: sig .. end


Implementation of the LONG_RUNNING API with nohup setsid unix processes or generated Python scripts.

Implementation of the LONG_RUNNING API with nohup setsid unix processes or generated Python scripts.

This module implements the 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):

The 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
The “standard” plugin-API.
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 ]
Create a “long-running” Ketrew_pure.Target.build_process (run parameters are already serialized), see Edsl.daemonize for more details
val markup : run_parameters ->
Ketrew_pure.Internal_pervasives.Display_markup.t
val get_playground : run_parameters -> Ketrew_pure.Path.t option