summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-10-30 03:32:38 +0100
committerLennart Poettering <lennart@poettering.net>2009-10-30 03:32:38 +0100
commit65e7bc18a9a7b89e55b87a74ae47d45269b51847 (patch)
treeb9f58d76a78ecc0c03557bf7a7dad14cf28e15f9 /src/daemon
parent9c1a98953f25aff7f11af80a073c9c46dee2438c (diff)
use cloexec wrappers wherever applicable
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/cpulimit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c
index c2877ecf..f5042a75 100644
--- a/src/daemon/cpulimit.c
+++ b/src/daemon/cpulimit.c
@@ -188,15 +188,13 @@ int pa_cpu_limit_init(pa_mainloop_api *m) {
last_time = pa_rtclock_now();
/* Prepare the main loop pipe */
- if (pipe(the_pipe) < 0) {
+ if (pa_pipe_cloexec(the_pipe) < 0) {
pa_log("pipe() failed: %s", pa_cstrerror(errno));
return -1;
}
pa_make_fd_nonblock(the_pipe[0]);
pa_make_fd_nonblock(the_pipe[1]);
- pa_make_fd_cloexec(the_pipe[0]);
- pa_make_fd_cloexec(the_pipe[1]);
api = m;
io_event = api->io_new(m, the_pipe[0], PA_IO_EVENT_INPUT, callback, NULL);