NetBSD/bin
kre b0172d2346 Deal with overflow when the sleep duration given is a simple
integer (previously it was just clamped at the max possible value).
This would have caused
	sleep 10000000000000000000
(or anything bigger) to have only actually slept for 9223372036854775807
secs.   Someone would have noticed that happen, one day, in some other
universe.

This is now an error, as it was previously if this had been entered as
	sleep 1e19

Also detect an attempt to sleep for so long that a time_t will no longer
be able to represent the current time when the sleep is done.

Undo the attempts to work around a broken kernel nanosleep()
implementation (by only ever issuing shortish sleep requests,
and looping).   That code was broken (idiot botch of mine) though
you would have had to wait a month to observe it happen.  I was going
to just fix it, but sanity prevailed, and the kernel got fixed instead.

That allows this to be much simplified, only looping as needed to
handle dealing with SIGINFO.   Switch to using clock_nanosleep()
to implement the delay, as while our nanosleep() uses CLOCK_MONOTONIC
the standards say it should use CLOCK_REALTIME, and if that we
ever changed that, the old way would alter "sleep 5" from
"sleep for 5 seconds" to "sleep until now + 5 secs", which is
subtly different.

Always use %g format to print the original sleep duration in reports of how
much time remains - this works best for both long and short durations.
A couple of other minor (frill) mods to the SIGINFO report message as well.
2019-03-10 15:18:45 +00:00
..
cat Add cross reference to tac(1). 2017-10-02 08:24:17 +00:00
chio typo: unvalid -> invalid 2017-10-16 17:08:35 +00:00
chmod Use Ex. 2017-07-04 06:46:51 +00:00
cp Clarify a sentence about the error handling of cp(1)'s -p option. 2018-12-23 01:29:23 +00:00
csh compare pointers with NULL not '\0'. 2019-02-01 08:29:03 +00:00
date Remove trailing whitespace and Tn macro. 2018-01-27 18:59:38 +00:00
dd Fix typos; use American spelling consistently. Remove an unnecessary macro. 2019-01-30 10:28:50 +00:00
df -G cannot be specified alongside -i or -P. 2018-08-26 23:34:52 +00:00
domainname
echo Use Ex. 2017-07-04 06:46:51 +00:00
ed Unifdef compatibility for broken realloc. 2019-01-04 19:13:58 +00:00
expr Add a missing check to handle correctly 0 * 0 in expr(1) 2018-06-27 17:23:36 +00:00
hostname
kill Reverse a decision made when the printsignals() routines from 2018-12-12 20:22:43 +00:00
ksh - use -Wno-error=implicit-fallthrough with GCC7. 2019-02-04 04:05:15 +00:00
ln Update usage to include -w 2018-08-26 23:01:06 +00:00
ls Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
mkdir Use Ex. Remove superfluous Pp. 2017-07-04 06:49:35 +00:00
mt Bump date for previous. 2018-09-01 07:26:56 +00:00
mv Use Ex. 2017-07-04 06:50:04 +00:00
pax - bump buffer sizes to avoid potential truncation issues 2019-02-04 04:36:41 +00:00
ps Don't display l_wchan, either there is something in l_wmesg and we display 2018-09-19 15:20:39 +00:00
pwd Use Ex. 2017-07-04 06:50:04 +00:00
rcmd Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
rcp
rm Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
rmdir PR/48182: Fix rmdir -p handling of top-level (root) directory. 2017-08-10 22:52:13 +00:00
sh The previous commit was obviously made by a broken mindless automoton 2019-03-01 06:15:01 +00:00
sleep Deal with overflow when the sleep duration given is a simple 2019-03-10 15:18:45 +00:00
stty Remove Tn. 2017-10-30 15:38:52 +00:00
sync
test Allow SMALL (and TINY) builds of test (for SMALL/TINY builds of sh) 2018-09-13 22:00:58 +00:00
Makefile
Makefile.inc