From owner-cvs-lib Mon May 12 03:17:26 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA09822 for cvs-lib-outgoing; Mon, 12 May 1997 03:17:26 -0700 (PDT) Received: from spinner.DIALix.COM (spinner.dialix.com [192.203.228.67]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id DAA09812; Mon, 12 May 1997 03:16:50 -0700 (PDT) Received: from spinner.DIALix.COM (localhost.dialix.com.au [127.0.0.1]) by spinner.DIALix.COM with ESMTP id SAA05871; Mon, 12 May 1997 18:16:38 +0800 (WST) Message-Id: <199705121016.SAA05871@spinner.DIALix.COM> X-Mailer: exmh version 2.0gamma 1/27/96 To: Peter Wemm cc: CVS-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/gen sleep.c In-reply-to: Your message of "Mon, 12 May 1997 03:04:58 MST." <199705121004.DAA07686@freefall.freebsd.org> Date: Mon, 12 May 1997 18:16:37 +0800 From: Peter Wemm Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Peter Wemm wrote: > peter 97/05/12 03:04:58 > > Modified: lib/libc/gen sleep.c > Log: > Use nanosleep() in all cases, not just in the reentrant libc (_THREAD_SAFE) > version. I was just about to do the same to usleep() when I found a problem. usleep() has a void return, so there's no way to indicate an interrupted usleep(). Both sleep and usleep were coded the same way, ie: sit in a while loop waiting for interrupts until the sigalarm happens. is usleep() supposed to wait the full time even if interrupted? or is the application supposed to do a gettimeofday() to determine how long really passed? -Peter