From: Richard W.M. Jones Date: Sat, 10 Mar 2012 13:58:22 +0000 (+0000) Subject: Implement whenjobs --daemon-start and --daemon-restart flags. X-Git-Tag: 0.6~1 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=d0eb02dfe7ab7db2f9e67c4313a1cad3b0ce4d93;p=whenjobs.git Implement whenjobs --daemon-start and --daemon-restart flags. --- diff --git a/tools/whenjobs.ml b/tools/whenjobs.ml index db32eaf..f77e825 100644 --- a/tools/whenjobs.ml +++ b/tools/whenjobs.ml @@ -407,7 +407,7 @@ and list_variables () = stop_client client and daemon_start () = - assert false + exit (Sys.command "whenjobsd") and daemon_stop () = let client = start_client () in @@ -421,7 +421,14 @@ and daemon_stop () = stop_client client and daemon_restart () = - assert false + (try + let client = start_client_no_exit () in + ignore (Whenproto_clnt.When.V1.exit_daemon client ()); + stop_client client + with _ -> () + ); + sleep 1; + daemon_start () and daemon_status () = let r =