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