mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
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
This commit is contained in:
parent
7f92542420
commit
d9c4c9509d
8 changed files with 21 additions and 27 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue