summaryrefslogtreecommitdiffstats
path: root/src/daemon/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-09-12 00:17:51 +0000
committerLennart Poettering <lennart@poettering.net>2007-09-12 00:17:51 +0000
commitd9c4c9509d34ba89db06ff1252f3da18c6fd623b (patch)
treec43528c07e55bd4aaa2cf618056e7679c9c7f14a /src/daemon/main.c
parent7f92542420ef6085b6f090954052266cc70af8a1 (diff)
add new pa_pipe_close() API to close two fds at the same time
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1812 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/daemon/main.c')
-rw-r--r--src/daemon/main.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 0bbddffa..93d4eb6b 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -158,14 +158,6 @@ static void signal_callback(pa_mainloop_api*m, PA_GCC_UNUSED pa_signal_event *e,
}
}
-static void close_pipe(int p[2]) {
- if (p[0] != -1)
- pa_assert_se(pa_close(p[0]) == 0);
- if (p[1] != -1)
- pa_assert_se(pa_close(p[1]) == 0);
- p[0] = p[1] = -1;
-}
-
#define set_env(key, value) putenv(pa_sprintf_malloc("%s=%s", (key), (value)))
#if defined(HAVE_PWD_H) && defined(HAVE_GRP_H)
@@ -745,7 +737,7 @@ finish:
if (valid_pid_file)
pa_pid_file_remove();
- close_pipe(daemon_pipe);
+ pa_close_pipe(daemon_pipe);
#ifdef OS_IS_WIN32
WSACleanup();