]> git.puffer.fish Git - matthieu/frr.git/commit
lib: allow infinite sleep in poll()
authorQuentin Young <qlyoung@cumulusnetworks.com>
Mon, 5 Jun 2017 20:18:48 +0000 (20:18 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 6 Jun 2017 14:23:42 +0000 (14:23 +0000)
commit82fc5591f440ee9810ce2c5d90d41a9f419062c8
tree9befe013dd5f46aed52d62c491fe425b51b6d649
parent8899960086f249fe07458c99ad8237f794f19dc8
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>
lib/thread.c