From owner-freebsd-bugs Thu Jul 24 09:48:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA10394 for bugs-outgoing; Thu, 24 Jul 1997 09:48:09 -0700 (PDT) Received: from lestat.nas.nasa.gov (lestat.nas.nasa.gov [129.99.50.29]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA10389 for ; Thu, 24 Jul 1997 09:48:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lestat.nas.nasa.gov (8.8.6/8.6.12) with SMTP id JAA17014; Thu, 24 Jul 1997 09:43:27 -0700 (PDT) Message-Id: <199707241643.JAA17014@lestat.nas.nasa.gov> X-Authentication-Warning: lestat.nas.nasa.gov: localhost [127.0.0.1] didn't use HELO protocol To: TLiddelow@cybec.com.au (Tim Liddelow) Cc: freebsd-bugs@hub.freebsd.org Subject: Re: bin/4154: wish /bin/sleep handled fractions of a second. Reply-To: Jason Thorpe From: Jason Thorpe Date: Thu, 24 Jul 1997 09:43:26 -0700 Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Thu, 24 Jul 1997 16:41:47 +1000 TLiddelow@cybec.com.au (Tim Liddelow) wrote: > > How on earth can you call such a script "portable" if it clearly uses > > something not specified in POSIX? > > > > Pedantic, man! The new /bin/sleep will handle BOTH formats. It handles > a superset of the POSIX spec. No, it doesn't conform EXACTLY to the > POSIX spec but it _will_ handle all cases that the original /bin/sleep > did. I agree that of course it won't barf and be an error case now if > you include a '.' but I still think that's a good thing. You'll note I was speaking with regard to the scripts that use such a feature - the submitter specifically used the word "portable", and I am asserting that such scripts are _not_ portable if they use a feature that is not defined by POSIX. Hmm... ware there any shells out there that implement sleep(1) as a builtin? Hmm, I had planned on looking up a few other things in XPG4 today, so perhaps I will also look up /bin/sleep's behavior, as well, to satisfy my curiosity regarding what X/Open says should be a valid vs. invalid argument. Anyhow, allowing /bin/sleep to have sub-second granularity may be a "cool" feature, but its utility is limited by the fact that you can't count on it being there wherever the script may run. Jason R. Thorpe thorpej@nas.nasa.gov NASA Ames Research Center Home: 408.866.1912 NAS: M/S 258-6 Work: 415.604.0935 Moffett Field, CA 94035 Pager: 415.428.6939