Skip to content

Commit

Permalink
Merge pull request #466 from marckleinebudde/fix-canbusload
Browse files Browse the repository at this point in the history
canbusload: main(): switch from pselect() to select()
  • Loading branch information
marckleinebudde authored Oct 6, 2023
2 parents c5b6480 + 8e2caa8 commit 46fae98
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions canbusload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 46fae98

Please sign in to comment.