Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/bin/sleep



    Date:        Fri, 25 Jan 2019 21:45:46 +0700
    From:        Robert Elz <kre%munnari.OZ.AU@localhost>
    Message-ID:  <22498.1548427546%jinx.noi.kre.to@localhost>

In a message I sent last night (the one where everything
was mixed up ...) I said:

  | As for the other OS's, I believe that linux supports floating point, 
  | but I have no idea how they parse it (I'll ask Paul Eggert,

His reply included:

eggert%cs.ucla.edu@localhost said:
    | That's documented in the manual, here:
    | https://www.gnu.org/software/coreutils/manual/html_node/Floating-point.html
    | We tend not to put these gory details into the man pages. 

If I read that correctly, it means that linux sleep (and probably most other
commands they have which take floating point input) parse it as specified
by LC_NUMERIC

I am sure that someone here has access to a linux system with a suitable
locale installed to test this ... I was going to say I don't have access to
anything running linux any more, but then remembered that I do ... only
to find that the only locales they have actually installed are english and thai.
So that doesn't help.   (Thai uses '.')

kre

ps: Paul also pointed out that linux has been accepting floats as an arg to
sleep since (at least) 1992, and suspects that BSD support might have
been copied from them.  Which it might have been, I have no idea why
the submitter of the 1997 PR decided it was needed.

Paul also updated the liinux sleep man page (in response to my message)
to remove the implication that linux sleep is the only one that accepts
floating point (which might have been correct when it was written, but is
not any more).   I will do a similar change to our sleep(1) when I update
it (which is already planned to happen with the next commit - but it will
still remain devoid of mention of locale issues...)



Home | Main Index | Thread Index | Old Index