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 4 of 5] CA-33440: Remove an unused open() of /dev/null,

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 4 of 5] CA-33440: Remove an unused open() of /dev/null, allowing us to delete the helper function which did it
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 21 Dec 2009 18:03:41 +0000
Delivery-date: Mon, 21 Dec 2009 09:59:52 -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 5804d83078d753643135d39a82da533a91909132
# Parent  5d7ca743daabc6eebb95684a757201b24bb41656
CA-33440: Remove an unused open() of /dev/null, allowing us to delete the 
helper function which did it.

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

diff -r 5d7ca743daab -r 5804d83078d7 ocaml/gpg/gpg.ml
--- a/ocaml/gpg/gpg.ml  Mon Dec 21 15:40:31 2009 +0000
+++ b/ocaml/gpg/gpg.ml  Mon Dec 21 15:40:31 2009 +0000
@@ -93,8 +93,6 @@
 
   finally  (* make sure I close all my open fds in the end *)
     (fun () ->
-       Forkhelpers.with_dev_null (* open /dev/null *)
-        (fun dev_null ->
            (* Capture stderr output for logging *)
            match Forkhelpers.with_logfile_fd "gpg"
              (fun log_fd ->
@@ -114,7 +112,7 @@
                  raise InvalidSignature
              | Forkhelpers.Failure(log, exn) ->
                  debug "Error from gpg: %s" log;
-                 raise exn))
+                 raise exn)
     (fun () -> List.iter Unix.close !fds_to_close)
 
 let with_signed_cleartext filename f =
1 file changed, 1 insertion(+), 3 deletions(-)
ocaml/gpg/gpg.ml |    4 +---


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

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