- if ((select_ret = select(fd + 1, &read_fds, NULL, NULL, NULL)) == -1)
+ int select_ret = select(fd + 1, &read_fds, NULL, NULL, NULL);
+ if (select_ret == -1) {
+ if (errno == EINTR) {
+ assert(stopping); // that should have been SIGTERM
+ return;
+ }