aboutsummaryrefslogtreecommitdiffstats
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/interface.c b/src/interface.c
index a36131cec..00e009307 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -127,8 +127,6 @@ static void set_send_buf_size(Interface * interface)
static void openInterface(Interface * interface, int fd)
{
- int flags;
-
assert(interface->fd < 0);
interface->cmd_list_size = 0;
@@ -137,8 +135,7 @@ static void openInterface(Interface * interface, int fd)
interface->bufferLength = 0;
interface->bufferPos = 0;
interface->fd = fd;
- while ((flags = fcntl(fd, F_GETFL)) < 0 && errno == EINTR) ;
- while (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0 && errno == EINTR) ;
+ set_nonblocking(fd);
interface->lastTime = time(NULL);
interface->cmd_list = NULL;
interface->cmd_list_tail = NULL;