summaryrefslogtreecommitdiff
path: root/bin/ksh
AgeCommit message (Collapse)Author
2014-12-12Range check the value of the base for typeset -i base x=y. Instead ofJonathan Gray
erroring for values outside of the range switch to base 10 to match the behaviour of ksh93. As we have a smaller digit alphabet than ksh93 the accepted range is smaller (2-36) than ksh93 (2-64). The other form of setting a base, typeset -i x=base#y already has a range check that errors (as ksh93 also does for that syntax). Fixes a crash found with the afl fuzzer.
2014-12-09put back some information what the character classes actually mean;Ingo Schwarze
while here, remove the lie that regex(3) character classes would depend on the locale; ok jmc@
2014-12-09no more ctype(3);Jason McIntyre
2014-12-08Don't need special complex rand vs arc4random code. If theTheo de Raadt
standards-mandated "seed" method is used, simply call srand_deterministic() and the subsystem switches out of strong random mode into C89 crap mode. ok millert
2014-12-08fix crash when trying to apply ++ without an lvalue; ok millert@ jsg@Otto Moerbeek
2014-11-20remove sys/file.h includes in favor of fcntl.h where needed.Ted Unangst
ok deraadt guenther
2014-08-27promote "times" to posix special built-in;Jason McIntyre
ok guenther
2014-08-17update the built-ins list:Jason McIntyre
- "times" is both promoted to posix and special (ooh!) - "pwd" is promoted to posix, but not special (aah!) while here, jiggle the text somewhat to clarify that "non-POSIX" actually meant when posix mode is off, not mandated by posix joint work with guenther
2014-08-11Still need to separately set FD_CLOEXEC if the new fd was >= FDBASE.Philip Guenther
Affects scripts that directly use 9 of the first 10 fds. noted by miod@
2014-08-10Replace F_DUPFD followed by setting FD_CLOEXEC with just F_DUPFD_CLOEXECPhilip Guenther
ok matthew@ millert@
2014-02-12missing .An macros, based on a patch from Jan Stary <hans at stare dot cz>Ingo Schwarze
2014-01-28update book references;Jason McIntyre
From: Jan Stary tweaked a bit by myself
2014-01-20Obvious .Xr fixes, found while testing mandocdb(8).Ingo Schwarze
2013-12-20Fix a crash in ksh when trying to access ${12345678901234567890}Vadim Zhukov
Input from deraadt@, millert@ and otto@. okay from millert@ plus a willing from deraadt@
2013-12-18incorrect cast for ctype, spotted and repaired by LEVAI DanielTheo de Raadt
2013-12-18Remove artificial limit on the max array index.Todd C. Miller
Adapted from a bitrig commit from Martin Natano. OK zhuk@
2013-12-17ctype cleanups. Repeated re-audits of this sensitive area by okan andTheo de Raadt
myself, with a variety of other people spending some time as well. Thanks.
2013-12-02Move ksh test files into regressMove ksh test files into regressMove ksh ↵Todd C. Miller
test files into regress.
2013-11-28remove trailing whitespaces; use tabs instead of spaces where appropriate;Igor Sobrado
no binary changes.
2013-11-14be more specific in ulimit error messages.Marc Espie
prompted by henning@ okay millert@, krw@, pirofti@
2013-11-12add a variety of missing prototypesTheo de Raadt
2013-09-14Back out revision 1.38. Commands executed via `foo` or $( bar )Todd C. Miller
actually should inherit "set -e" status according to POSIX. OK jca@
2013-09-04Add a proper suspend builtin that saves/restores the tty and pgrpTodd C. Miller
as needed instead of an alias that just sends SIGSTOP. Login shells may be suspended if they are not running in an orphan process group. OK guenther@ jmc@
2013-07-01Make $(< /nonexistent) have the same behaviour as $(cat /nonexistent)Jeremie Courreges-Anglas
wrt. errors (do not unwind and do not treat this as fatal if set -e is used). This matches what bash does. Tweak regress tests while here. ok millert@, jasper@ agrees
2013-06-19Add test for syn.c revision 1.29Todd C. Miller
2013-06-19Commands executed via `foo` or $( bar ) should not inherit "set -e"Todd C. Miller
status. We can't use XERROK for this (since the command might set -e itself) so just save & restore the value of FERREXIT for the comsub() call to execute(). OK jca@
2013-06-16set -e should not affect command substitution, e.g. `foo` orTodd C. Miller
$( foo ). However, if set -e is specified as part of the command it needs to be honored.
2013-06-15Add test for trapping both ERR and EXIT, fixed by revision 1.48Todd C. Miller
of exec.c
2013-06-15Run any pending traps before calling the EXIT or ERR traps when -eTodd C. Miller
is set. Fixes a bug where we would not run the signal trap if, for example, ^C was pressed and -e was set. OK espie@
2013-06-14Add -T option to set the temp dir.Todd C. Miller
2013-06-14Use mkstemp/mkdtemp not $$ for temp files.Todd C. Miller
2013-06-14Exit with non-zero status if a test unexpectedly failed.Todd C. Miller
2013-06-14Adapt OpenBSD ksh regress tests to the pdksh test harness.Todd C. Miller
2013-06-13Document correct interaction of -e flag with && and ||. OK jmc@Todd C. Miller
2013-06-10POSIX specifies that for an AND/OR list, only the last command'sTodd C. Miller
exit status matters for "set -e". Revert the part of revision 1.49 that always sets xerrok for AND/OR. This makes sh/ksh pass the updated regress tests. OK espie@ jca@
2013-06-03for var in; do ... shouldn't be interpreted as for var; do ...Jeremie Courreges-Anglas
Fix by returning an empty token list instead of NULL to consumers. Brings base ksh more in line with POSIX.
2013-06-03add : to special chars.Ted Unangst
identical diffs from plhk sdf.org and leva ecentrum.hu. ok deraadt.
2013-04-19handle long long time_tTheo de Raadt
ok millert tedu
2013-04-19Add support for printing long long (%lld). OK deraadt@Todd C. Miller
2013-04-16remove unneccessary time_t * castTheo de Raadt
2013-04-05SECONDS is, in a highly theoretical way, not y2k38 safe. comment it.Ted Unangst
2013-03-28Don't die with SIGFPE on LONG_MIN / -1 or % -1. Instead make LONG_MIN /Nicholas Marriott
-1 == LONG_MIN and % -1 == 0. ok matthew deraadt
2013-03-20Remove bogus #if 0'd code. As the comment says, POSIX doesn't need this.Todd C. Miller
OK martynas@
2013-03-18Keep documentation in sync with reality and update binding examples.Martin Pieuchot
This should have been part of the keybinding rewrote when support for multi-character sequences has been added. Pointed out by mikeb@
2013-03-03Fix quoting in word part of ${var+word} (and similar) when entire thingPhilip Guenther
is quoted or in a here-doc. Patch from Alexander Polakov (plhk (at) sdf.org). ok mpi@ jung@
2013-01-21revert the tweak part of the last commit which, apart from theAlexander Hall
questionable functionality of being able to expand environment variables that did not match a filename, preserved the annoyance of having stuff like "~/nonexistant" expanded to "~/nonexistant\* " ok stsp@ mpi@
2013-01-20Fix backslash escaping during filename tab-completion in ksh.Stefan Sperling
Diff originally submitted by Alexander Polakov, with a small tweak from me to avoid breaking tab-completion of environment variables (problem pointed out by bentley). ok sthen halex mpi
2013-01-17remove some uesless Pp;Jason McIntyre
2012-09-10fake a sigwinch after each job, so if the terminal changes size,Ted Unangst
we'll notice and update
2012-09-06Avoid modifying argv when building argv for $* and $@ since it willTodd C. Miller
affect ps output. This can happen when command line options are specified, e.g. "sh -c command". Based on a diff from espie@ OK espie@