From db977dcbd165e4f32502aef03b43cbf63b2a0250 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 10 Mar 2012 13:17:53 +0000 Subject: [PATCH] daemon: Implement ping command. --- daemon/daemon.ml | 3 +++ lib/whenproto.x | 1 + 2 files changed, 4 insertions(+) diff --git a/daemon/daemon.ml b/daemon/daemon.ml index 5b9fc3b..cf14188 100644 --- a/daemon/daemon.ml +++ b/daemon/daemon.ml @@ -82,6 +82,7 @@ let rec init j d = ~proc_set_variables ~proc_get_job_names ~proc_test_variables + ~proc_ping_daemon (Rpc_server.Unix addr) Rpc.Tcp (* not TCP, this is the same as SOCK_STREAM *) Rpc.Socket @@ -256,6 +257,8 @@ and proc_test_variables vars = (* Return the names. *) Array.of_list jobnames +and proc_ping_daemon () = `ok + (* Reload the jobs file. *) and reload_file () = let file = sprintf "%s/jobs.cmo" !jobsdir in diff --git a/lib/whenproto.x b/lib/whenproto.x index 1d8980a..ff5edfb 100644 --- a/lib/whenproto.x +++ b/lib/whenproto.x @@ -102,5 +102,6 @@ program When { status set_variables (set_variable_list) = 10; job_name_list get_job_names (void) = 11; job_name_list test_variables (set_variable_list) = 12; + status ping_daemon (void) = 13; } = 1; } = 0x20008081; -- 1.8.3.1