xend: Set 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>
This commit is contained in:
Keir Fraser committed 2009-04-01 11:45:22 +01:00
1 parent c6d5b4e310
commit c9a16ee02d
1 file changed
+2
+2
View File
@@ -317,6 +317,8 @@ class SocketDgramListener:
def main(self):
try:
fcntl.fcntl(self.sock.fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC)
while True:
try:
data = self.sock.recv(BUFFER_SIZE)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.