mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
consolidate close() calls to pa_close(), and make sure on every occasion that we handle failures of close() sensibly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1811 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
54506ab44a
commit
7f92542420
18 changed files with 89 additions and 81 deletions
|
|
@ -524,7 +524,7 @@ static int context_connect_spawn(pa_context *c) {
|
|||
int n;
|
||||
|
||||
/* Not required, since fds[0] has CLOEXEC enabled anyway */
|
||||
close(fds[0]);
|
||||
pa_assert_se(pa_close(fds[0]) == 0);
|
||||
|
||||
if (c->spawn_api.atfork)
|
||||
c->spawn_api.atfork();
|
||||
|
|
@ -571,7 +571,7 @@ static int context_connect_spawn(pa_context *c) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
close(fds[1]);
|
||||
pa_assert_se(pa_close(fds[1]) == 0);
|
||||
|
||||
c->is_local = 1;
|
||||
|
||||
|
|
@ -586,9 +586,9 @@ static int context_connect_spawn(pa_context *c) {
|
|||
|
||||
fail:
|
||||
if (fds[0] != -1)
|
||||
close(fds[0]);
|
||||
pa_assert_se(pa_close(fds[0]) == 0);
|
||||
if (fds[1] != -1)
|
||||
close(fds[1]);
|
||||
pa_assert_se(pa_close(fds[1]) == 0);
|
||||
|
||||
unlock_autospawn_lock_file(c);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue