From bb2de1fd488bf8b7660ad578fe331eb50f903e12 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Sun, 16 Aug 2015 21:56:47 +0200
Subject: [PATCH] Make an assertion give more information
---
liberty.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/liberty.c b/liberty.c
index c6b38b8..c559e9b 100644
--- a/liberty.c
+++ b/liberty.c
@@ -679,7 +679,8 @@ static bool
set_blocking (int fd, bool blocking)
{
int flags = fcntl (fd, F_GETFL);
- hard_assert (flags != -1);
+ if (flags == -1)
+ exit_fatal ("%s: %s", "fcntl", strerror (errno));
bool prev = !(flags & O_NONBLOCK);
if (blocking)