From be8517b9c16e38cf4f9f564bd1f0528f13f4313a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 14 Oct 2015 21:56:14 +0200 Subject: linux guarantees that a call to clock will always close the file descriptor if valid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mongoclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mongoclock.c b/src/mongoclock.c index 9d822e5..3170c95 100644 --- a/src/mongoclock.c +++ b/src/mongoclock.c @@ -294,7 +294,7 @@ int main(int argc, char* argv[]) fprintf(stdout, "\033[?25h\n\033[?1049l"); fflush(stdout); - TEMP_FAILURE_RETRY(close(fd)); + close(fd); return 0; fail: @@ -302,7 +302,7 @@ int main(int argc, char* argv[]) fprintf(stdout, "\033[?25h\n\033[?1049l"); fflush(stdout); if (fd >= 0) - TEMP_FAILURE_RETRY(close(fd)); + close(fd); return 1; (void) argc; } -- cgit v1.2.3-70-g09d2