Make an assertion give more information
This commit is contained in:
parent
1a305a1c6b
commit
bb2de1fd48
@ -679,7 +679,8 @@ static bool
|
|||||||
set_blocking (int fd, bool blocking)
|
set_blocking (int fd, bool blocking)
|
||||||
{
|
{
|
||||||
int flags = fcntl (fd, F_GETFL);
|
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);
|
bool prev = !(flags & O_NONBLOCK);
|
||||||
if (blocking)
|
if (blocking)
|
||||||
|
Loading…
Reference in New Issue
Block a user