Module Ketrew_daemonize (.ml)

module Ketrew_daemonize: sig .. end
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_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 ->
[ `Error of string | `Ok of run_parameters ]
include Ketrew_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_host.t ->
?no_log_is_ok:bool ->
Ketrew_program.t -> [> `Long_running of string * string ]
Create a “long-running” Ketrew_target.build_process (run parameters are already serialized), see Ketrew_edsl.daemonize for more details