]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
oxenstored: move sd_notify_ready out of main loop
authorWei Liu <wei.liu2@citrix.com>
Mon, 10 Aug 2015 08:00:19 +0000 (09:00 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 13 Aug 2015 09:24:03 +0000 (10:24 +0100)
Oxenstored only needs to notify systemd its readiness state once. Move
sd_notify_ready out of main loop.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Dave Scott <dave.scott@eu.citrix.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/ocaml/xenstored/xenstored.ml

index f4840247b67cffc924e2efb6a395de7ee56bf657..42b8183d4d13324129d46c3c430f20c89dcd594f 100644 (file)
@@ -428,11 +428,11 @@ let _ =
                process_domains store cons domains
                in
 
+       if Systemd.launched_by_systemd () then
+               Systemd.sd_notify_ready ();
        while not !quit
        do
                try
-                        if Systemd.launched_by_systemd() then
-                                Systemd.sd_notify_ready ();
                        main_loop ()
                with exc ->
                        error "caught exception %s" (Printexc.to_string exc);