[comp.bugs.sys5] ksh88b bug

hartl@lan.informatik.tu-muenchen.dbp.de (Anton Hartl) (08/08/90)

I've found a bug in ksh88b that occured when I started ksh to execute
a shell script in a C shell environment (with neither a .profile nor
$PWD set).

I boiled the bug down to the following line

	ksh -c "cd .. ; pwd"

which produces in that case (no .profile, no PWD in the environment)

	ksh: pwd: cannot access parent directories

If you setenv PWD to something (doesn't seem to matter what you set
it to) the line above produces the expected result, i.e. the
complete path of "..".

Somehow ksh does not set its own current directory properly.

If anyone has a fix for this, I'll be pleased to see it.

-Toni

--
Anton Hartl | hartl@.informatik.tu-muenchen.de, ...!unido!tumult!hartl
Only those who attempt the absurd will achieve the impossible. -Escher