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

View File

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