All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Set close-on-exec flag for datagram sockets
Date: Wed, 01 Apr 2009 16:28:53 +0900	[thread overview]
Message-ID: <49D317B5.1050209@ab.jp.nec.com> (raw)

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 <y-iwamatsu@ab.jp.nec.com>

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)

                 reply	other threads:[~2009-04-01  7:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49D317B5.1050209@ab.jp.nec.com \
    --to=y-iwamatsu@ab.jp.nec.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.