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 12:29:12 -0000 (UTC)
    From:        christos%astron.com@localhost (Christos Zoulas)
    Message-ID:  <q2eveo$109$1%blaine.gmane.org@localhost>

  | I think that we should consult what the standards say about all of this,
  | what is the current practice on other OS's, and then decide and document
  | the decision and approach to handle this consistently across all applications.

Sounds entirely reasonable, except the standards won't say anything
relevant about sleep in particular, as only integers are supported there.
The same is probably true of most other OS's (the BSDs probably
excepted) as well.

If OpenBSD haven't changed their code from what is in the original
NetBSD PR, then they would only handle '.'.

FreeBSD use scanf (%f) to parse the arg, which I assume means they
they process the arg in a locale specific way, as scanf (sscanf really)
should use locales, right.

So not much help there either.

What other commands take floating point args on the command line
(aside from awk assignments to vars, which are certainly intended
to be locale specific) I'm not sure I can think of one.

So, where exactly should be look?

kre



Home | Main Index | Thread Index | Old Index