GNU bug report logs - #18103
sleep infinity

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Fri, 25 Jul 2014 05:11:01 UTC

Severity: normal

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18103 in the body.
You can then email your comments to 18103 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Fri, 25 Jul 2014 05:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 25 Jul 2014 05:11:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: sleep infinity
Date: Fri, 25 Jul 2014 08:43:03 +0800
Perhaps add an infinity option:
$ sleep infinity
or mention a workaround in the documentation.




Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Fri, 25 Jul 2014 07:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 18103 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>, 
 18103 <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Fri, 25 Jul 2014 09:28:10 +0200
On 07/25/2014 02:43 AM, 積丹尼 Dan Jacobson wrote:
> Perhaps add an infinity option:
> $ sleep infinity
> or mention a workaround in the documentation.

Thanks for the proposal.
However, while the theoretical need may be there, I don't
see a practical use case here.

The internal data type is already a 'double', so it's
more than big enough. You could e.g. use

  $ sleep 10000d

which is ...

  $ bc <<<"10000 / 365"
  27

... 27 years; and nothing prevents you from choosing
_much_ larger numbers - although I doubt you'll really
want to wait that long.

Can you give an example where you'd need a "sleep forever"?

Have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Fri, 25 Jul 2014 22:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 18103 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>, 
 18103 <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Fri, 25 Jul 2014 18:10:16 -0400
On 07/24/2014 08:43 PM, 積丹尼 Dan Jacobson wrote:
> Perhaps add an infinity option:
> $ sleep infinity
>

That already works.  At least it works for me, as long as I cared to 
test it....




Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Sat, 26 Jul 2014 10:16:01 GMT) Full text and rfc822 format available.

Message #14 received at 18103 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18103 <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Sat, 26 Jul 2014 18:15:04 +0800
The user needs to know what is a safe guess for an arbitrarily high
number, i.e., the man page should state the legal range for NUMBER.
0 .. [WHAT?]
Hmmm, on my system
$ sleep 99999999999999999999999999999999999999999999999
apparently works but I'm not going to wait around to find out.

Anyway give a statement there on the man page about how one can
determine the highest value one can use on ones system.

>>>>> "PE" == Paul Eggert <eggert <at> cs.ucla.edu> writes:

PE> On 07/24/2014 08:43 PM, 積丹尼 Dan Jacobson wrote:
>> Perhaps add an infinity option:
>> $ sleep infinity

PE> That already works.  At least it works for me, as long as I cared to
PE> test it....

And indeed it does! But who would ever guess? Please document it on the
man page! Anyway, still mention what the legal range of values is too!

$ strings /bin/sleep|grep -i infinity
$




Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Sat, 26 Jul 2014 12:02:01 GMT) Full text and rfc822 format available.

Message #17 received at 18103 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 18103 <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Sat, 26 Jul 2014 08:01:06 -0400
On 07/26/2014 06:15 AM, 積丹尼 Dan Jacobson wrote:
> And indeed it does! But who would ever guess?

Well, *you* figured it out.  Plus, you deduced 
99999999999999999999999999999999999999999999999, an alternative that 
also works for all practical purposes.

This stuff is documented in the coreutils manual.  It's not clear that 
this particular detail is so important that it needs to be in the sleep 
--help output aka man page.




Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Sat, 26 Jul 2014 12:16:02 GMT) Full text and rfc822 format available.

Message #20 received at 18103 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18103 <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Sat, 26 Jul 2014 20:15:03 +0800
>>>>> "PE" == Paul Eggert <eggert <at> cs.ucla.edu> writes:


PE> This stuff is documented in the coreutils manual.  It's not clear that
PE> this particular detail is so important that it needs to be in the
PE> sleep --help output aka man page.

No seeming mention in
coreutils:
  Installed: 8.21-1.2
        500 http://ftp.br.debian.org/debian/ unstable/main i386 Packages

Not on info sleep nor anywhere else in the coreutils manuals.





Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Sat, 26 Jul 2014 12:58:01 GMT) Full text and rfc822 format available.

Message #23 received at 18103 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 18103 <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Sat, 26 Jul 2014 08:57:20 -0400
On 07/26/2014 08:15 AM, 積丹尼 Dan Jacobson wrote:
> Not on info sleep nor anywhere else in the coreutils manuals.
In my copy of the manual (from coreutils 8.23) 'info sleep' says "GNU 
‘sleep’ accepts arbitrary floating point numbers.  *Note 
Floatingpoint::." and the note explains details.




Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Sat, 26 Jul 2014 13:21:02 GMT) Full text and rfc822 format available.

Message #26 received at 18103 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18103 <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Sat, 26 Jul 2014 21:20:45 +0800
Indeed it says
  However, GNU `sleep' accepts arbitrary floating point numbers.  *Note
  Floating point::.

Alas "infinity" doesn't sound like an arbitrary floating point number.

So maybe it should say arbitrary floating point numbers and "infinity",
else some people will give up instead of following the link. But OK I am
old fashioned.




Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Sat, 26 Jul 2014 20:34:02 GMT) Full text and rfc822 format available.

Message #29 received at 18103 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 18103 <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Sat, 26 Jul 2014 21:32:55 +0100
On 07/25/2014 01:43 AM, 積丹尼 Dan Jacobson wrote:
> Perhaps add an infinity option:
> $ sleep infinity
> or mention a workaround in the documentation.

I'm having déjà vu with http://bugs.gnu.org/7877
`sleep inf` was mentioned there with portability notes.
Checking again I see it's not portable to solaris 10 or FreeBSD 9.1
Personally I've preferred "inf" rather than "infinity" in my scripts, as:

  $ printf '%g\n' infinity INF
  inf
  inf

cheers,
Pádraig.




Reply sent to Bernhard Voelker <mail <at> bernhard-voelker.de>:
You have taken responsibility. (Wed, 30 Jul 2014 06:11:02 GMT) Full text and rfc822 format available.

Notification sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
bug acknowledged by developer. (Wed, 30 Jul 2014 06:11:03 GMT) Full text and rfc822 format available.

Message #34 received at 18103-done <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>, 
 Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Eric Blake <eblake <at> redhat.com>, 18103-done <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Wed, 30 Jul 2014 08:09:55 +0200
tag 18103 fixed
thanks

On 07/26/2014 03:20 PM, 積丹尼 Dan Jacobson wrote:
> So maybe it should say arbitrary floating point numbers and "infinity"

"sleep inf" already works and "inf" is now also documented
in the section "Floating points" with Eric's commit
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=d8a19e0336

I'm therefore marking this bug as done.

Thanks & have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#18103; Package coreutils. (Wed, 30 Jul 2014 06:21:01 GMT) Full text and rfc822 format available.

Message #37 received at 18103-done <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: Eric Blake <eblake <at> redhat.com>, Paul Eggert <eggert <at> cs.ucla.edu>,
 18103-done <at> debbugs.gnu.org
Subject: Re: bug#18103: sleep infinity
Date: Wed, 30 Jul 2014 14:20:02 +0800
OK however on the sleep info page it says

   Historical implementations of `sleep' have required that NUMBER be
an integer, and only accepted a single argument without a suffix.
However, GNU `sleep' accepts arbitrary floating point numbers.  *Note
Floating point::.

However for at least me, I wouldn't have thought that paragraph also
meant infinity. So you might want to say

   Historical implementations of `sleep' have required that NUMBER be
an integer, and only accepted a single argument without a suffix.
However, GNU `sleep' accepts arbitrary floating point numbers and infinity.  *Note
Floating point::.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 27 Aug 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.