sub shm CHANGE check errno after select only when ret = -1
@@ -2863,7 +2863,7 @@ wait_for_event:
SR_ERRINFO_SYSERRNO(&err_info, "select");
sr_errinfo_free(&err_info);
goto error;
- } else if ((!ret || (errno == EINTR)) && !stop_time_in) {
+ } else if ((!ret || ((ret == -1) && (errno == EINTR))) && !stop_time_in) {
/* timeout/signal received, retry */
goto wait_for_event;
}
