diff options
-rw-r--r-- | liberty.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |