]> Zhao Yanbai Git Server - minix.git/commitdiff
Mark ethernet fd nonblocking to avoid waiting for an ethernet address
authorPhilip Homburg <philip@cs.vu.nl>
Fri, 9 Dec 2005 13:21:58 +0000 (13:21 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Fri, 9 Dec 2005 13:21:58 +0000 (13:21 +0000)
commands/dhcpd/devices.c

index 888ef6ce53942f12dc17a15b35fb2aa975bff95a..02944fb3502103fa2ce7466dffab68673113eea0 100755 (executable)
@@ -173,6 +173,7 @@ int opendev(network_t *np, fdtype_t fdtype, int compete)
 
     switch (fdtype) {
     case FT_ETHERNET:
+       fcntl(np->fdp->fd, F_SETFL, fcntl(np->fdp->fd, F_GETFL) | O_NONBLOCK);
        if (ioctl(np->fdp->fd, NWIOGETHSTAT, &ethstat) < 0) {
            /* Not an Ethernet. */
            close(fdp->fd);