summaryrefslogtreecommitdiffstats
path: root/src/pulse
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse')
-rw-r--r--src/pulse/client-conf.c2
-rw-r--r--src/pulse/mainloop-signal.c4
-rw-r--r--src/pulse/mainloop.c4
3 files changed, 3 insertions, 7 deletions
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index 62c06f6a..3eaca4d9 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -110,7 +110,7 @@ int pa_client_conf_load(pa_client_conf *c, const char *filename) {
if (filename) {
- if (!(f = fopen(filename, "r"))) {
+ if (!(f = pa_fopen_cloexec(filename, "r"))) {
pa_log(_("Failed to open configuration file '%s': %s"), fn, pa_cstrerror(errno));
goto finish;
}
diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c
index 3dc74398..70c0122c 100644
--- a/src/pulse/mainloop-signal.c
+++ b/src/pulse/mainloop-signal.c
@@ -124,15 +124,13 @@ int pa_signal_init(pa_mainloop_api *a) {
pa_assert(signal_pipe[1] == -1);
pa_assert(!io_event);
- if (pipe(signal_pipe) < 0) {
+ if (pa_pipe_cloexec(signal_pipe) < 0) {
pa_log("pipe(): %s", pa_cstrerror(errno));
return -1;
}
pa_make_fd_nonblock(signal_pipe[0]);
pa_make_fd_nonblock(signal_pipe[1]);
- pa_make_fd_cloexec(signal_pipe[0]);
- pa_make_fd_cloexec(signal_pipe[1]);
api = a;
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 090ac8c2..6cd089ef 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -482,7 +482,7 @@ pa_mainloop *pa_mainloop_new(void) {
m = pa_xnew0(pa_mainloop, 1);
- if (pipe(m->wakeup_pipe) < 0) {
+ if (pa_pipe_cloexec(m->wakeup_pipe) < 0) {
pa_log_error("ERROR: cannot create wakeup pipe");
pa_xfree(m);
return NULL;
@@ -490,8 +490,6 @@ pa_mainloop *pa_mainloop_new(void) {
pa_make_fd_nonblock(m->wakeup_pipe[0]);
pa_make_fd_nonblock(m->wakeup_pipe[1]);
- pa_make_fd_cloexec(m->wakeup_pipe[0]);
- pa_make_fd_cloexec(m->wakeup_pipe[1]);
m->rebuild_pollfds = TRUE;