From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosuke Iwamatsu Subject: [PATCH] Set close-on-exec flag for datagram sockets Date: Wed, 01 Apr 2009 16:28:53 +0900 Message-ID: <49D317B5.1050209@ab.jp.nec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Set the close-on-exec flag for datagram sockets. We need to close the socket on the child side when xend creates a child process such as qemu-dm. Signed-off-by: Yosuke Iwamatsu diff -r d5ddc782bc49 tools/python/xen/web/connection.py --- a/tools/python/xen/web/connection.py Mon Mar 30 16:48:26 2009 +0100 +++ b/tools/python/xen/web/connection.py Wed Apr 01 15:38:38 2009 +0900 @@ -317,6 +317,8 @@ def main(self): try: + fcntl.fcntl(self.sock.fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC) + while True: try: data = self.sock.recv(BUFFER_SIZE)