]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
CA-33440: Remove some dead code
authorDavid Scott <dave.scott@eu.citrix.com>
Mon, 21 Dec 2009 15:36:48 +0000 (15:36 +0000)
committerDavid Scott <dave.scott@eu.citrix.com>
Mon, 21 Dec 2009 15:36:48 +0000 (15:36 +0000)
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
stdext/forkhelpers.ml
stdext/forkhelpers.mli

index 8a752afea1278d1ed98e04b973647151bf82055a..d7591473083b5f54a76b8841ebc95236d7a20346 100644 (file)
@@ -38,22 +38,6 @@ let string_of_pidty p =
 
 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
    exec* so that we don't end up with two ocaml processes. *)
index f9b39f123901301db305be6f24e650b840cffbe8..64e0f8ae006bafb388b6654a910d8555fa67cdb4 100644 (file)
@@ -32,12 +32,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 *)
 type fd_operation =