From 48f82119ce55caa7671598fb1bd90df4eb00d150 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 15 Jun 2011 10:16:09 +0200 Subject: [PATCH] util: return errno in close_nointr() --- src/util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util.c b/src/util.c index 156d32a2..b291e2f7 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; } } -- 2.39.5