Merge pull request #297 from marckleinebudde/fix-candump

candump: fix epoll_wait() returning -1, errno == -EINTR
pull/301/head
Marc Kleine-Budde 2021-05-28 12:22:59 +02:00 committed by GitHub
commit a70801f1ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}