mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
regress: avoid interference from systemwide /etc/ksh.kshrc
ksh, even non-interactive, loads /etc/ksh.kshrc by default. On
some systems this can be a problem, e.g. OpenBSD, which installs a
default /etc/ksh.kshrc which is designed for its version of pdksh.
Quoth sh.1:
On systems that support a system wide /etc/ksh.kshrc
initialization file, if the filename generated by the expansion
of ENV begins with /./ or ././ the system wide initialization
file will not be executed.
src/cmd/ksh93/tests/shtests,
src/cmd/ksh93/tests/builtins.sh,
src/cmd/ksh93/tests/options.sh,
src/cmd/ksh93/tests/pty.sh:
- Instead of emptying or unsetting ENV, ensure it is exported with
a default value of /./dev/null so we skip loading the system-wide
profile and load an empty user profile.
- Where a specific ENV path was required for the tests, prefix it
with '/.' so it starts with '/./'.
This commit is contained in:
parent
bb4745e897
commit
c870be9fea
4 changed files with 10 additions and 9 deletions
|
|
@ -165,7 +165,8 @@ function valxml
|
|||
return $errors
|
||||
}
|
||||
|
||||
unset DISPLAY ENV FIGNORE HISTFILE
|
||||
unset DISPLAY FIGNORE HISTFILE
|
||||
export ENV=/./dev/null
|
||||
trap + PIPE # unadvertized -- set SIGPIPE to SIG_DFL #
|
||||
|
||||
integer compile=-1 posix=-1 utf8=-1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue