Date: Tue, 12 Aug 1997 21:48:37 +0200 (MEST) From: Søren Schmidt <sos@sos.freebsd.dk> To: ache@nagual.pp.ru (=?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?=) Cc: current@FreeBSD.ORG Subject: Re: Error in sleep ! Message-ID: <199708121948.VAA01292@sos.freebsd.dk> In-Reply-To: <Pine.BSF.3.96.970812223055.26009B-100000@lsd.relcom.eu.net> from "[______ ______]" at "Aug 12, 97 10:35:07 pm"
index | next in thread | previous in thread | raw e-mail
In reply to [______ ______] who wrote:
[Charset KOI8-R unsupported, filtering to ASCII...]
> On Tue, 12 Aug 1997, S_ren Schmidt wrote:
>
> > Hmm, we don't even use it correctly ourselves, check /bin/sleep !!
> > I have the fear that it also is the case in other places.
>
> What do you mean exactly? I just look at /bin/sleep and not find
> any non-POSIX behaviour...
Well to quote sleep(1):
The sleep command suspends execution for a minimum of seconds. sleep is
used to schedule the execution of other commands (see EXAMPLES below).
The sleep utility exits with one of the following values:
0 On successful completion, or if the signal SIGALRM was received.
>0 An error occurred.
This is not how our sleep(1) functions!, it'll exit on the first signal
it gets, because of the change in sleep(3)'s behavior....
> > How on earth did POSIX come up with that behavior ??
>
> It was even in early POSIX.1
That doesn't mean they are right :)
Now one has to encapsulte sleep(3) in a while loop to get it to
actually sleep the specified time, thats plain an simple stupid,
and also poses a risk for busy looping, a complete no-no i an
*IX system...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team
Even more code to hack -- will it ever end
..
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708121948.VAA01292>
