summaryrefslogtreecommitdiff
path: root/posix-aio-compat.c
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 /posix-aio-compat.c
parent12c09b8ce22d74f78ff50f95676cbe4f501752ae (diff)
downloadqemu-40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4.tar.gz
qemu-40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4.tar.bz2
qemu-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 'posix-aio-compat.c')
-rw-r--r--posix-aio-compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index 7f391c9373..ac247e1e3b 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -625,7 +625,7 @@ int paio_init(void)
sigaction(SIGUSR2, &act, NULL);
s->first_aio = NULL;
- if (pipe(fds) == -1) {
+ if (qemu_pipe(fds) == -1) {
fprintf(stderr, "failed to create pipe\n");
return -1;
}