From: Todd C. Miller Date: Fri, 18 Sep 2009 13:18:30 +0000 (+0000) Subject: Fix nanosleep emulation X-Git-Tag: SUDO_1_7_3~282 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=680351cb9b71fb79701010f43379bd99adc585bd;p=sudo Fix nanosleep emulation --- diff --git a/sudoreplay.c b/sudoreplay.c index 3096fc2a0..9228cfcd9 100644 --- a/sudoreplay.c +++ b/sudoreplay.c @@ -314,12 +314,12 @@ nanosleep(ts, rts) int rval; timeout.tv_sec = ts->tv_sec; - timeout.tv_usec = ts->tv_nsecs / 1000; + timeout.tv_usec = ts->tv_nsec / 1000; if (rts != NULL) { gettimeofday(&endtime, NULL); timeradd(&endtime, &timeout, &endtime); } - rval = select(NULL, NULL, NULL, &timeout); + rval = select(0, NULL, NULL, NULL, &timeout); if (rts != NULL && rval == -1 && errno == EINTR) { gettimeofday(&now, NULL); timersub(&endtime, &now, &timeout);