diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-06-15 10:16:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-21 19:29:44 +0200 |
commit | 48f82119ce55caa7671598fb1bd90df4eb00d150 (patch) | |
tree | 6e84c2a7418f40f75661393f7d4278b2b8b2c8c2 /src | |
parent | 3f49d45a45c6c585098590174c3245d2d9bdde0a (diff) |
util: return errno in close_nointr()
Diffstat (limited to 'src')
-rw-r--r-- | src/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c index 156d32a2e0..b291e2f729 100644 --- a/src/util.c +++ b/src/util.c @@ -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; } } |