From: Mark Huang Date: Wed, 7 Feb 2007 04:35:20 +0000 (+0000) Subject: close nonstandard fds before forking X-Git-Tag: PLCAPI-4.2-0~214 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d0700a5df9ef75885eaf69caf849385afbfdd620;p=plcapi.git close nonstandard fds before forking --- diff --git a/PLC/GPG.py b/PLC/GPG.py index f351f27..a393ca7 100644 --- a/PLC/GPG.py +++ b/PLC/GPG.py @@ -7,7 +7,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: GPG.py,v 1.4 2007/01/10 20:18:52 mlhuang Exp $ +# $Id: GPG.py,v 1.5 2007/02/01 22:28:12 mlhuang Exp $ # import os @@ -55,7 +55,7 @@ def gpg_export(keyring, armor = True): if armor: args.append("--armor") - p = Popen(args, stdin = PIPE, stdout = PIPE, stderr = PIPE) + p = Popen(args, stdin = PIPE, stdout = PIPE, stderr = PIPE, close_fds = True) export = p.stdout.read() err = p.stderr.read() rc = p.wait() diff --git a/PLC/Methods/SliceGetTicket.py b/PLC/Methods/SliceGetTicket.py index 33043ca..64413c9 100644 --- a/PLC/Methods/SliceGetTicket.py +++ b/PLC/Methods/SliceGetTicket.py @@ -236,7 +236,7 @@ class SliceGetTicket(GetSliceTicket): p = Popen(["xmlsec1", "--sign", "--privkey-pem", self.api.config.PLC_API_TICKET_KEY, ticket.name], - stdin = PIPE, stdout = PIPE, stderr = PIPE) + stdin = PIPE, stdout = PIPE, stderr = PIPE, close_fds = True) signed_ticket = p.stdout.read() err = p.stderr.read() rc = p.wait()