arcstat
@@ -100,20 +100,21 @@ pause_left = pause; do { pause_tv.tv_sec = pause_left / NANOSEC; pause_tv.tv_nsec = pause_left % NANOSEC; status = nanosleep(&pause_tv, (struct timespec *)NULL); - if (status < 0) + if (status < 0) { if (errno == EINTR) { now = gethrtime(); pause_left = *wakeup - now; if (pause_left < 1000) /* Near enough */ return; } else { fail(1, "nanosleep failed"); } + } } while (status != 0); } /* * Signal handler - so we can be aware of SIGCONT