Merge pull request #466 from marckleinebudde/fix-canbusload

canbusload: main(): switch from pselect() to select()
pull/468/head
Marc Kleine-Budde 2023-10-06 14:23:27 +02:00 committed by GitHub
commit 46fae98b76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -251,7 +251,6 @@ int main(int argc, char **argv)
struct canfd_frame frame; struct canfd_frame frame;
int nbytes, i; int nbytes, i;
struct ifreq ifr; struct ifreq ifr;
sigset_t sigmask, savesigmask;
signal(SIGTERM, sigterm); signal(SIGTERM, sigterm);
signal(SIGHUP, sigterm); signal(SIGHUP, sigterm);
@ -392,11 +391,8 @@ int main(int argc, char **argv)
for (i = 0; i < currmax; i++) for (i = 0; i < currmax; i++)
FD_SET(s[i], &rdfs); FD_SET(s[i], &rdfs);
savesigmask = sigmask; if (select(s[currmax - 1] + 1, &rdfs, NULL, NULL, NULL) < 0) {
if (pselect(s[currmax - 1] + 1, &rdfs, NULL, NULL, NULL, &sigmask) < 0) {
//perror("pselect"); //perror("pselect");
sigmask = savesigmask;
continue; continue;
} }