Commit Graph

5 Commits

Author SHA1 Message Date
Jilles Tjoelker
8eac1f9477 sh: On startup of the shell, use PWD from the environment if it is valid.
Unset PWD if it is incorrect and no value for it can be determined.
This preserves the logical current directory across shell invocations.

Example (assuming /home is a symlink):
$ cd
$ pwd
/home/foo
$ sh
$ pwd
/home/foo

Formerly the second pwd would show the physical path (symlinks resolved).
2010-04-17 14:35:46 +00:00
Jilles Tjoelker
e74e09f851 sh: Test that bogus values of PWD are not imported from the environment.
Current versions pass this test trivially by never importing PWD, but I plan
to change sh to import PWD if it is an absolute pathname for the current
directory, possibly containing symlinks.
2010-04-11 20:21:34 +00:00
Jilles Tjoelker
91f2621cd1 sh: Make sure the mail2.0 test can actually fail if $MAIL is not touched. 2010-02-08 18:57:18 +00:00
Jilles Tjoelker
5706357661 sh: Do not stat() $MAIL/$MAILPATH in non-interactive shells.
These may be NFS mounted, and we should not touch them unless we are going
to do something useful with the information.
2010-02-06 22:57:24 +00:00
Stefan Farfeleder
a5e27424dd Add a test for r185231. 2008-11-23 20:27:03 +00:00