git.annexia.org
/
whenjobs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement whenjobs --daemon-start and --daemon-restart flags.
[whenjobs.git]
/
tools
/
whenjobs.ml
diff --git
a/tools/whenjobs.ml
b/tools/whenjobs.ml
index
db32eaf
..
f77e825
100644
(file)
--- a/
tools/whenjobs.ml
+++ b/
tools/whenjobs.ml
@@
-407,7
+407,7
@@
and list_variables () =
stop_client client
and daemon_start () =
stop_client client
and daemon_start () =
- assert false
+ exit (Sys.command "whenjobsd")
and daemon_stop () =
let client = start_client () in
and daemon_stop () =
let client = start_client () in
@@
-421,7
+421,14
@@
and daemon_stop () =
stop_client client
and daemon_restart () =
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 =
and daemon_status () =
let r =