# HG changeset patch # User David Scott # Date 1261410031 0 # Node ID 5d7ca743daabc6eebb95684a757201b24bb41656 # Parent 3eaa36a3803c23f912d2a2e4d46638313ca8af01 CA-33440: Remove an unnecessary reference to Forkhelpers.Nopid (allowing us to delte the value altogether) Signed-off-by: David Scott diff -r 3eaa36a3803c -r 5d7ca743daab ocaml/xapi/xapi_remotecmd.ml --- a/ocaml/xapi/xapi_remotecmd.ml Mon Dec 21 15:40:30 2009 +0000 +++ b/ocaml/xapi/xapi_remotecmd.ml Mon Dec 21 15:40:31 2009 +0000 @@ -24,13 +24,13 @@ let do_cmd s cmd args = let cmdline = String.concat " " (cmd :: args) in - let pid = ref Forkhelpers.nopid in match with_logfile_fd "execute_command_get_output" (fun log_fd -> (* Capture stderr output for logging *) - pid := safe_close_and_exec (Some s) (Some s) (Some log_fd) [] cmd args; - snd(waitpid !pid)) with - | Success(log, status) -> + let pid = safe_close_and_exec (Some s) (Some s) (Some log_fd) [] cmd args in + snd(waitpid pid) + ) with + | Success(log, status) -> debug "log: %s" log; begin match status with | Unix.WEXITED 0 -> ignore(log)