[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 3 of 5] CA-33440: Remove an unnecessary reference to Forkhelpers.Nopid (allowing us to delte the value altogether)



# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# 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 <dave.scott@xxxxxxxxxxxxx>

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)
1 file changed, 4 insertions(+), 4 deletions(-)
ocaml/xapi/xapi_remotecmd.ml |    8 ++++----


Attachment: xen-api.hg-5.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.