call close() in a loop to catch EINTR

This commit is contained in:
Lennart Poettering 2008-08-26 15:44:55 +02:00
parent 2a78f865c1
commit 0a1f654c20

View file

@ -398,7 +398,15 @@ int pa_close(int fd) {
} }
#endif #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 /* Print a warning messages in case that the given signal is not