From c5de5b80605833ac02e1c1123f7a29f113ef1653 Mon Sep 17 00:00:00 2001 From: Tomasz Wroblewski Date: Tue, 12 Jan 2010 12:41:08 +0000 Subject: [PATCH] [xenvm] Couple small changes - Emit a notification when dbus rpc interface is ready to receive calls - Fork demon process only after checking for exisiting xenvm instance, so the client actually gets proper exit code as supposed --- xenvm/xenvm.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xenvm/xenvm.ml b/xenvm/xenvm.ml index eb90616..b31df63 100644 --- a/xenvm/xenvm.ml +++ b/xenvm/xenvm.ml @@ -831,6 +831,8 @@ let monitor_rpc_dbus state = "expecting string method followed by dictionnary" in Some (err_msg) in + (* notify that dbus RPC is up and running *) + Vmact.notify state Xenvmlib.code_ping [ "dbus-rpc-up" ]; while not state.vm_monitors.monitor_dbus_quit do (* check for outgoing work *) @@ -1013,9 +1015,6 @@ let () = state.vm_monitors.monitor_use_dbus_session <- !monitor_dbus_session; state.vm_monitors.monitor_use_json <- !monitor_json; - if !daemonize then - Unixext.daemonize (); - let glob_debug = try Some (Sys.getenv "XENVM_DEBUG") with Not_found -> None in if state.vm_cfg.debug || glob_debug <> None then ( let a = @@ -1046,4 +1045,6 @@ let () = ); check_vm uuid; + if !daemonize then + Unixext.daemonize (); main state -- 2.39.5