atom feed12 messages in org.freebsd.freebsd-bugsRe: bin/4154: wish /bin/sleep handled...
FromSent OnAttachments
den...@home.comJul 23, 1997 10:18 pm 
Jason ThorpeJul 23, 1997 11:09 pm 
Tim LiddelowJul 23, 1997 11:41 pm 
Jordan K. HubbardJul 24, 1997 2:06 am 
Jordan K. HubbardJul 24, 1997 2:11 am 
Bruce EvansJul 24, 1997 5:25 am 
Jason ThorpeJul 24, 1997 9:43 am 
Tim LiddelowJul 24, 1997 5:00 pm 
Sergei S. LaskavyJul 25, 1997 1:28 am 
Jason ThorpeJul 25, 1997 7:54 am 
FreeBSD Technical ReaderJul 26, 1997 12:28 pm 
FreeBSD Technical ReaderJul 26, 1997 12:29 pm 
Subject:Re: bin/4154: wish /bin/sleep handled fractions of a second.
From:Bruce Evans (bd@zeta.org.au)
Date:Jul 24, 1997 5:25:31 am
List:org.freebsd.freebsd-bugs

In this particular case, if you have a script which says something like:

foo sleep 0.8 bar sleep 0.9 baz

And you bring it to a non-BSD system, it will not sleep _at all_ since the other system sees "sleep 0", and that could be bad depending on what bar and baz do.

It should of course do something like:

sleep: invalid time `0.8' (not a nonnegative decimal integer as specified by POSIX.2 4.57.4) sleep: invalid time `0.9' ...

BSD's sleep has the usual sloppy numeric arg checking using atoi(), so it won't do anything like this.

This is exactly the kind of interoperability problem that POSIX was intended to try and solve. Let's not fight it.

I agree.

Bruce