aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2009-12-02 12:24:42 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 11:45:50 -0600
commit40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4 (patch)
tree98d560a0de229f27a66f637cfcadbb1672e68cc3 /qemu_socket.h
parentqemu-img: There is more than one host device driver (diff)
downloadqemu-kvm-40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4.tar.gz
qemu-kvm-40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4.tar.bz2
qemu-kvm-40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4.zip
Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on file descriptors that don't need to be passed to children to stop this misbehaviour. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu_socket.h')
-rw-r--r--qemu_socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/qemu_socket.h b/qemu_socket.h
index c253b3241..86bdbf53d 100644
--- a/qemu_socket.h
+++ b/qemu_socket.h
@@ -32,6 +32,8 @@ int inet_aton(const char *cp, struct in_addr *ia);
#include "qemu-option.h"
/* misc helpers */
+int qemu_socket(int domain, int type, int protocol);
+int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
void socket_set_nonblock(int fd);
int send_all(int fd, const void *buf, int len1);