From df445a1da1e60f4772141d93c1bace3cbc239eea Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 21 Jan 2008 22:04:43 +0000 Subject: [PATCH] Zero the rset when we fallthrough the waiting for packet. --- client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client.c b/client.c index ad2a192b..47c72920 100644 --- a/client.c +++ b/client.c @@ -411,8 +411,12 @@ static int wait_for_packet (fd_set *rset, state_t *state, if (! (state->timeout > 0 || (options->timeout == 0 && - (state->state != STATE_INIT || state->xid)))) + (state->state != STATE_INIT || state->xid)))) { + /* We need to zero our rset, otherwise we will block trying + * to read a signal. */ + FD_ZERO (rset); return (0); + } if ((options->timeout == 0 && state->xid) || (dhcp->leasetime == (unsigned) -1 && -- 2.47.3