rendered paste body fprintf(stderr, "Entering scanning loop...\n"); do { pollfds[0].fd = 0; pollfds[0].events = POLLIN | POLLPRI | POLLHUP | POLLERR; pollfds[0].revents = 0; pollfds[1].fd = fd; pollfds[1].events = POLLIN | POLLPRI; pollfds[1].revents = 0; poll(pollfds, 2, 1); if(pollfds[1].revents & (POLLIN | POLLPRI)) { Can_IntHandler(); } gettimeofday(&now, NULL); if(now.tv_usec >= can_int.tv_usec) { can_int.tv_usec = now.tv_usec + 16000L; if(can_int.tv_usec > 99999L) can_int.tv_usec -= 100000L; ProcessDNet(); processDNetIOData(); } if(now.tv_sec >= timer.tv_sec) { timer.tv_sec = now.tv_sec + 1; } } while(! pollfds[0].revents);