-
-
-
-
-
usr/src/man/man1/sleep.1 (Diff revision 1) I don't think LC_MESSAGES and NLSPATH affect anything as you don't seem to use gettext()?
-
usr/src/man/man1/sleep.1 (Diff revision 1) Why? I don't think linking to library functions is helpful here.
-
-
-
usr/src/cmd/sleep/sleep.c (Diff revision 1) nit: Since you're really using strtold() further down, perhaps use that in the comment too instead of strtod()?
-
-
-
-
usr/src/cmd/sleep/sleep.c (Diff revision 1) I suggest to add
|| eptr == argv[1]
here to cover two cases:1)
sleep s
will properly report "failed to parse time s" instead of silently succeed.
2)sleep ""
, so you could remove the explicit test for this case above. -
usr/src/cmd/sleep/sleep.c (Diff revision 1) We should fail for
sec < 0
(man page says: non-negative). We should also fail for cases likesleep -0.2
. -
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+608 -190) |
Change Summary:
Update for gettext(3C).
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+619 -190) |
-
-
usr/src/cmd/sleep/sleep.c (Diff revision 3) Please test what does:
sleep " "
sleep " s"
sleep " -s"
sleep " +s"
sleep "1 "
I suspect at least some of them won't work as expected.
There is also general question: Should
sleep " 1"
succeed or fail? It looks like both GNUsleep
and kshsleep
succeeds here.Also, it looks like
/usr/bin/sleep "1 "
(ksh sleep) sleeps forever, while/usr/gnu/bin/sleep "1 "
(GNU sleep) simply fails.
-
-
usr/src/cmd/sleep/sleep.c (Diff revision 3) At line 103 you compare with
0.0
when you want to compare with zero. I think these constants should be unified.
Change Summary:
Fix locale override.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+619 -190) |