package devkit

  1. Overview
  2. Docs
Development kit - general purpose library

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.20210120.tbz
md5=47338eaae436aba40abd4d194ee40054
sha256=499b050b73643f6ad7349a41485539d4166d149a07fba59cb6841f508c0297f8
sha512=6a5bf77061d390ddb331ed3d5891a5c56502be91f0eff6846202f658ebfa97ef57695d7a192cbdad4c7b8835f5665df3ea4375daf46930334ebbd9a07f00feca

doc/devkit.core/Devkit_core/Daemon/index.html

Module Devkit_core.DaemonSource

daemon utilities

Sourceval logfile : string option ref
Sourceval pidfile : string option ref
Sourceval runas : Unix.passwd_entry option ref
Sourceval foreground : bool ref
Sourceval managed : bool ref
Sourceval should_exit_ : bool ref

global flag indicating that process should exit, manage will automatically set this flag on SIGTERM unless default signal handling is overriden

Sourceval should_exit_lwt : unit Lwt.t

should_exit_lwt usage is discouraged. Use wait_exit instead, which makes it harder to ignore "should exit" state and loop infinitely

Sourceval signal_exit_lwt : unit Lwt.u

should_exit_lwt usage is discouraged. Use wait_exit instead, which makes it harder to ignore "should exit" state and loop infinitely

Sourceval should_exit : unit -> bool
Sourceval should_run : unit -> bool
Sourceexception ShouldExit

exception to be raised by functions that wish to signal premature termination due to !should_exit = true

Sourceval signal_exit : unit -> unit
Sourceval break : unit -> unit
  • raises ShouldExit

    if should_exit condition is set, otherwise do nothing

Sourceval wait_exit : unit -> 'a Lwt.t

wait until should_exit is set and raise ShouldExit

Sourceval break_lwt : unit -> unit Lwt.t

break_lwt = Lwt.wrap break

Sourceval unless_exit : 'a Lwt.t -> 'a Lwt.t

unless_exit x resolves promise x or raises ShouldExit

Sourceval get_args : unit -> (string * Arg.spec * string) list
Sourceval args : (string * Arg.spec * string) list
Sourceval install_signal_handlers : unit -> unit
Sourceval manage : unit -> unit
OCaml

Innovation. Community. Security.