From: David Scott Date: Mon, 21 Dec 2009 15:36:48 +0000 (+0000) Subject: CA-33440: Remove some dead code X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5580f2d18e0e72c9555f0b8b870ff70ec0057a61;p=xcp%2Fxen-api-libs.git CA-33440: Remove some dead code Signed-off-by: David Scott --- diff --git a/stdext/forkhelpers.ml b/stdext/forkhelpers.ml index 8a752af..d759147 100644 --- a/stdext/forkhelpers.ml +++ b/stdext/forkhelpers.ml @@ -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. *) diff --git a/stdext/forkhelpers.mli b/stdext/forkhelpers.mli index f9b39f1..64e0f8a 100644 --- a/stdext/forkhelpers.mli +++ b/stdext/forkhelpers.mli @@ -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 =