aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-08-16 21:56:47 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-08-16 21:56:47 +0200
commitbb2de1fd488bf8b7660ad578fe331eb50f903e12 (patch)
treea5c20306786f9dbf1b3e94cc7541f03120b638f5
parent1a305a1c6b1608219334d7512fc09081c9066c9e (diff)
downloadliberty-bb2de1fd488bf8b7660ad578fe331eb50f903e12.tar.gz
liberty-bb2de1fd488bf8b7660ad578fe331eb50f903e12.tar.xz
liberty-bb2de1fd488bf8b7660ad578fe331eb50f903e12.zip
Make an assertion give more information
-rw-r--r--liberty.c3
1 files changed, 2 insertions, 1 deletions
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)