12345678910111213141516171819202122232425262728293031323334moduleState=structtypet=|Ready(* Service startup is finished *)|Reloading(* Service is reloading its configuration. Has to send Ready when finished reloading *)|Stopping(* Service is beginning to shutdown *)|Statusofstring(* Passes a single UTF-8 status string *)|ErrorofUnix.error(* Service failed with Unix Erro *)|Bus_errorofstring(* Service failed with D-Bus error-style error code *)|Main_pidofint(* The main process ID *)|Watchdog(* Update the watchdog timestamp *)end(* FDSTORE not implemented yet *)externalcaml_code_of_unix_error:Unix.error->int="caml_daemon_code_of_unix_error"externalcaml_notify:bool->string->bool="caml_daemon_notify"letnotify?(unset_environment=false)state=letopenStateinlets=matchstatewith|Ready->"READY=1"|Reloading->"RELOADING=1"|Stopping->"STOPPING=1"|Statuss->"STATUS="^s|Erroru->"ERRNO="^(string_of_int(caml_code_of_unix_erroru))|Bus_errors->"BUSERROR="^s|Main_pidi->"MAINPID="^(string_of_inti)|Watchdog->"WATCHDOG=1"incaml_notifyunset_environmentsexternalcaml_listen_fds:bool->Unix.file_descrlist="caml_daemon_listen_fds"letlisten_fds?(unset_environment=true)()=caml_listen_fdsunset_environment;externalbooted:unit->bool="caml_daemon_booted"