From d0eb02dfe7ab7db2f9e67c4313a1cad3b0ce4d93 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 10 Mar 2012 13:58:22 +0000 Subject: [PATCH] Implement whenjobs --daemon-start and --daemon-restart flags. --- tools/whenjobs.ml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 = -- 1.8.3.1