mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
candump: fix epoll_wait() returning -1, errno == -EINTR
-EINTR is not an error, just restart the syscall.
Fixes: 639498bc80 ("candump: use epoll_wait() instead of select()")
Link: https://github.com/linux-can/can-utils/issues/296
Reported-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
@@ -690,10 +690,10 @@ int main(int argc, char **argv)
|
||||
msg.msg_control = &ctrlmsg;
|
||||
|
||||
while (running) {
|
||||
|
||||
if ((num_events = epoll_wait(fd_epoll, events_pending, currmax, timeout_ms)) <= 0) {
|
||||
//perror("epoll_wait");
|
||||
running = 0;
|
||||
num_events = epoll_wait(fd_epoll, events_pending, currmax, timeout_ms);
|
||||
if (num_events == -1) {
|
||||
if (errno != EINTR)
|
||||
running = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user