WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 3 of 5] CA-33440: Remove an unnecessary reference to Fo

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 3 of 5] CA-33440: Remove an unnecessary reference to Forkhelpers.Nopid (allowing us to delte the value altogether)
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 21 Dec 2009 18:03:40 +0000
Delivery-date: Mon, 21 Dec 2009 10:00:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1261418617@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# 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