mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 18:16:43 +00:00
lib: allow infinite sleep in poll()
If fd_poll() is called with no file descriptors, an incorrect check in the function prelude causes it to return instantly; for a thread that wishes to poll but has no file descriptors, this results in busy waiting. Desired behavior is to block. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
8899960086
commit
82fc5591f4
@ -647,9 +647,6 @@ static int
|
||||
fd_poll (struct thread_master *m, struct pollfd *pfds, nfds_t pfdsize,
|
||||
nfds_t count, struct timeval *timer_wait)
|
||||
{
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
/* If timer_wait is null here, that means poll() should block indefinitely,
|
||||
* unless the thread_master has overriden it by setting ->selectpoll_timeout.
|
||||
* If the value is positive, it specifies the maximum number of milliseconds
|
||||
|
Loading…
Reference in New Issue
Block a user