Don't block on the dhcpcd socket.
authorRoy Marples <roy@marples.name>
Tue, 2 Sep 2014 11:05:54 +0000 (11:05 +0000)
committerRoy Marples <roy@marples.name>
Tue, 2 Sep 2014 11:05:54 +0000 (11:05 +0000)
src/libdhcpcd/dhcpcd.c

index a86a05c93f0feda358a21d2f9dc4488e49067edd..491961a6f09cdd81be783cd1ccf785bcc1011595 100644 (file)
@@ -159,7 +159,7 @@ dhcpcd_connect(void)
        socklen_t len;
        struct sockaddr_un sun;
 
-       fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
+       fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
        if (fd == -1)
                return -1;