mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
call close() in a loop to catch EINTR
This commit is contained in:
parent
2a78f865c1
commit
0a1f654c20
1 changed files with 9 additions and 1 deletions
|
|
@ -398,7 +398,15 @@ int pa_close(int fd) {
|
|||
}
|
||||
#endif
|
||||
|
||||
return close(fd);
|
||||
for (;;) {
|
||||
int r;
|
||||
|
||||
if ((r = close(fd)) >= 0)
|
||||
return r;
|
||||
|
||||
if (errno != EINTR)
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
/* Print a warning messages in case that the given signal is not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue