diff options
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -54,7 +54,7 @@ client_connect(char *path, int start_server) { struct sockaddr_un sa; size_t size; - int fd, mode; + int fd; memset(&sa, 0, sizeof sa); sa.sun_family = AF_UNIX; @@ -84,10 +84,7 @@ client_connect(char *path, int start_server) } } - if ((mode = fcntl(fd, F_GETFL)) == -1) - fatal("fcntl failed"); - if (fcntl(fd, F_SETFL, mode|O_NONBLOCK) == -1) - fatal("fcntl failed"); + setblocking(fd, 0); return (fd); failed: |