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 1 of 6] CA-33440: Remove some dead code

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 1 of 6] CA-33440: Remove some dead code
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 21 Dec 2009 17:57:59 +0000
Delivery-date: Mon, 21 Dec 2009 09:54:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1261418278@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 1261409808 0
# Node ID 2729bb9dfe53eaa563c243d907593b9e8503114b
# Parent  c9e71483e9bbabb66fb11ec380e871ecb2b599f1
CA-33440: Remove some dead code

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r c9e71483e9bb -r 2729bb9dfe53 stdext/forkhelpers.ml
--- a/stdext/forkhelpers.ml     Mon Dec 21 14:22:52 2009 +0000
+++ b/stdext/forkhelpers.ml     Mon Dec 21 15:36:48 2009 +0000
@@ -37,22 +37,6 @@
     | Nopid -> "Nopid"
 
 let nopid = Nopid
-
-(** Standalone wrapper process which safely closes fds before exec()ing another
-    program *)
-
-exception Close_and_exec_binary_missing of string
-
-(* This needs to point to where the binaray closeandexec is installed *)
-let close_and_exec = "/opt/xensource/libexec/closeandexec"
-
-let close_and_exec_cmdline (fds: Unix.file_descr list) (cmd: string) (args: 
string list) = 
-  (* Sanity check: make sure the close_and_exec binary exists *)
-  (try Unix.access close_and_exec [ Unix.X_OK ] 
-   with _ -> raise (Close_and_exec_binary_missing close_and_exec));
-
-  let fds = List.map (fun x -> string_of_int (Unixext.int_of_file_descr x)) 
fds in
-  close_and_exec :: fds @ ("--" :: cmd :: args)
 
 (* Low-level (unsafe) function which forks, runs a 'pre_exec' function and
    then executes some other binary. It makes sure to catch any exception 
thrown by
diff -r c9e71483e9bb -r 2729bb9dfe53 stdext/forkhelpers.mli
--- a/stdext/forkhelpers.mli    Mon Dec 21 14:22:52 2009 +0000
+++ b/stdext/forkhelpers.mli    Mon Dec 21 15:36:48 2009 +0000
@@ -31,12 +31,6 @@
 val string_of_pidty : pidty -> string
 
 val nopid : pidty
-
-(** Standalone wrapper process which safely closes fds before exec()ing another
-    program *)
-val close_and_exec : string
-
-val close_and_exec_cmdline : Unix.file_descr list -> string -> string list -> 
string list
 
 (** File descriptor operations to be performed after a fork.
     These are all safe in the presence of threads *)
2 files changed, 22 deletions(-)
stdext/forkhelpers.ml  |   16 ----------------
stdext/forkhelpers.mli |    6 ------


Attachment: xen-api-libs.hg-6.patch
Description: Text Data

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