Age | Commit message (Collapse) | Author |
|
jump around.
suggested and ok jmc@, ok jcm@
|
|
code and removes a few BACKWARDS flags.
OK otto@
|
|
a buildin command, that just calls into c_whence().
This makes type look like the buildin in other shells and makes
things like system("'type' 'git'"); work.
With lots of suggestions and feedback from anton@, kn@ and jca@.
ok kn@ jca@
|
|
'$' characters are escaped, so that we are POSIX compliant.
The omission of trailing '$' was originally hidden behind a BACKWARDS
flag. This flag was most likely introduced to be compatible with 4.4BSD.
Thanks to naddy@ for pointing me to the 4.4BSD ed implementation.
I tried to trace the origin and enabling of the BACKWARDS flag, since
both FreeBSD and NetBSD have the flag, but only FreeBSD doesn't have it
enabled. Both projects had an alm@ working on ed during 1993-1995 during
which he added this flag to both projects and only enabled it on NetBSD,
but I wasn't able to reach him on any known address.
Thanks to Ed Schouten (ed@freebsd), and Michael W. Lucas of the ed
Mastery book for helping me trying to locate Andrew Moore.
Problem originally prodded by garzon.lucero@gmail.com and later
independently re-requested by n.reusse@hxgn.net.
OK tb@, guenther@, and mwl@mwl.io
|
|
ntpd, but apparently date was never revisited. "wpath" is for wtmp logging.
"rpath" for the case where -z argument isn't in the standard timezone dir.
discussed with tb and guenther
|
|
Revision 1.28 (2008) fixed stack abuse by allocating a new one and
effectively clearing it. This broke pipelines such as
$ time for i in . ; do : ; done
/bin/ksh: : is read only
Prompted by tb, OK millert, tb, jca
|
|
Keeps $SECONDS advancing uniformly and independent of wall clock jumps.
ok jca@
|
|
No binary change on amd64 and there should be no differences on any
other 64 bit architecture either (because long = int64_t).
ok cheloha, tb
|
|
Much simpler.
Dropping writev makes the output from summary() non-atomic, so
output lines triggered by SIGINFO can intermingle with output
lines triggered by SIGINT or atexit(3).
This behavior is difficult to trigger, even deliberately.
The buffer in dprintf is large enough so that lines produced by
summary() are not garbled if this occurs, though, so this is unlikely
to break any scripts.
Discussed at length with deraadt@, who helpfully noted that
"not all problems have perfect solutions."
ok millert@
|
|
Previously it was possible to overflow integers while parsing. With this
diff, we support any kind of POSIX-compatible integers for comparisons.
with input by and ok schwarze, ok tb
|
|
requested by deraadt@ after repeated questions on bugs@ and tech@,
e.g. from Gregoire Jadi and Craig Skinner.
|
|
Initial diff by me, later improved by schwarze@; also ok jmc@
|
|
Based on FreeBSD's expr and NetBSD's old regression test suite.
with input by and ok schwarze
|
|
|
|
wrong function and fix the rest for consistency.
Diff from Michael W. Bombardieri with some cosmetic cleanup applied.
ok benno@ tb@
|
|
trying to quit.
Diff from Tim Chase
OK tb@ and millert@
|
|
ok millert@ tb@
|
|
mode, to avoid potential confusion pointed out by andreas dot kahari
at icm dot uu dot se on misc@.
Patch minimally tweaked based on a comment from jmc@.
OK anton@ jca@ jmc@ on the previous version without the tweak.
|
|
and NUL
ok millert krw tb
|
|
|
|
|
|
More informative than the usage message.
While here, no need to return EINVAL: just return 1 if we overflow.
ok jca@ schwarze@
|
|
Makes us compliant with POSIX.1-2008, which requires that sleep(1) support
up to 2147483647 seconds.
Bounced off of tb@ and jca@.
ok tb@ millert@ jca@
|
|
also took the time to provide an excellent explanation on why the code isn't
useful on tech@.
ok jca@
|
|
This helps tools like scan-build, and follows the example of warningf()
and errorf(). ok anton@
|
|
it's rarely subject to change. While here, unifdef RLIMIT_VMEM.
ok jca@
|
|
emacs.c:1041:2: warning: Value stored to 'cp' is never read
|
|
str_val returns null, not NULL, if the variable isn't set. The
erroneous check means that we later tried to open("").
ok millert@ tb@ anton@ benno@
|
|
ok anton@
|
|
|
|
patch from Michael W. Bombardieri <mb at ii dot net>;
OK tb@
|
|
- it's safe to assume that there's no plan to write "an `agent' to
execute unreadable/setuid/setgid shell scripts"
- the BUG-REPORTS file has been removed
- update the entry for FPATH, ksh93 also documents the described behavior
- kill entry about octal and hex notation in arithmetic expressions
(supported)
- typos
Feedback from Klemens Nanni
|
|
|
|
from Klemens Nanni, thanks.
|
|
Namely POSIX character classes and tilde expansion within parameter
substitution. While here, kill a useless line and fix a typo.
From Klemens Nanni
|
|
OK anton@ jca@
|
|
Pointed out by Klemens Nanni who had ~ the same diff
|
|
|
|
that fixes the issues seen on hppa. OK deraadt@ otto@
|
|
Prompted by a mail from Klemens Nanni, who also had the same diff.
ok deraadt@ millert@
|
|
from Klemens Nanni
|
|
Requested by deraadt@
|
|
from erroring out with "dd: skip: Undefined error: 0", mostly for
consistency and to avoid the unidiomatic, wrong looking code.
Patch from Bulat Musin <mbulatka at yandex dot ru>.
OK guenther@ millert@
|
|
OK tb@
|
|
from kshe
|
|
the warnings are due to the use of globals with generic names,
specifically "options" and "path". I've renamed "options" to
"sh_options" since it holds the shell options and "path" to
"search_path". OK jca@ tb@
|
|
long time ago. Update the comments and replace test_stat() calls
with stat() since test_stat() now just calls stat() directly. Also
rename the "mode" parameter to "amode" in test_eaccess() to match
access(2) and make it clear that this is the access mode and not
the file mode. OK jca@
|
|
While here, use err(3) instead of errx(3) if adjtime(2) fails.
Discussed/tweaked with/by tb@ and jca@.
ok tb@ jca@
|
|
it out prior to continuing down the recursive call chain.
Initial diff from Michael W. Bombardieri, later tweaked; ok tb@
|
|
redundant call to free() since name is always freed upon return.
From Michael W. Bombardieri, with some tweaks by myself.
|