util: return errno in close_nointr()

This commit is contained in:
Lennart Poettering 2011-06-15 10:16:09 +02:00
parent 3f49d45a45
commit 48f82119ce
1 changed files with 3 additions and 2 deletions

View File

@ -230,11 +230,12 @@ int close_nointr(int fd) {
for (;;) {
int r;
if ((r = close(fd)) >= 0)
r = close(fd);
if (r >= 0)
return r;
if (errno != EINTR)
return r;
return -errno;
}
}