linux_udev: Retry poll() on EINTR
authorRomain Vimont <rom@rom1v.com>
Tue, 11 Oct 2016 19:51:31 +0000 (21:51 +0200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 3 Nov 2016 18:47:27 +0000 (19:47 +0100)
commit0a02d1212bfb7ff2e9f3fc603655b0220b7d6889
treecaa4bb189fad15231db89975e17560fd28465c2b
parent09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
linux_udev: Retry poll() on EINTR

The poll() syscall may temporarily fail when it is interrupted by a
signal; -1 is returned and errno is set to EINTR.

When this occurred, the udev event thread exited.

Instead, since this is a temporary failure, just try the call again.
<https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html>

Signed-off-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libusb/os/linux_udev.c
libusb/version_nano.h