diff options
Diffstat (limited to 'lib/libnetgraph/msg.c')
-rw-r--r-- | lib/libnetgraph/msg.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libnetgraph/msg.c b/lib/libnetgraph/msg.c index 48447d9..534d1d1 100644 --- a/lib/libnetgraph/msg.c +++ b/lib/libnetgraph/msg.c @@ -235,16 +235,17 @@ NgDeliverMsg(int cs, const char *path, /* Wait for reply if there should be one. */ if (msg->header.cmd & NGM_HASREPLY) { - fd_set rfds; + struct pollfd rfds; int n; - FD_ZERO(&rfds); - FD_SET(cs, &rfds); - n = select(cs + 1, &rfds, NULL, NULL, NULL); + rfds.fd = cs; + rfds.events = POLLIN; + rfds.revents = 0; + n = poll(&rfds, 1, INFTIM); if (n == -1) { errnosv = errno; if (_gNgDebugLevel >= 1) - NGLOG("select"); + NGLOG("poll"); rtn = -1; } } |