Chet Ramey wrote:
This is all correct. The change was introduced for a reason, and
accommodating a rare occurrence by backing it out would be non-
productive.
---
The reason?:
Why does bash clear OLDPWD when a child script is started?
OLDPWD is exported and passed to any children, but bash apparently clears
OLDPWD whenever a child script is started...
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Can bash be fixed to preserve the value of any OLDPWD in its initial
environment, like it does with PWD?
---
I don't see a reason...
I see a "want", but no real reason....
I'd agree it's a rare event to hit though, but when you do...
Requires console access, but changing /etc/profile to
insert a bad OLDPWD to a known down network location might not be
considered a trivial occurrence to someone stressed out and trying to log
in and find out why everyone logging in is hanging...