This is the first of several patches which will be necessary to make
>Assignments to this variable may be ignored. If an application sets or
>unsets the value of PWD, the behaviors of the cd and pwd utilities are
An argument could be made for aborting the shell when PWD is set, or
tainting the shell and aborting later if cd/pwd is called again.
"Unspecified behaviour" includes making PWD read-write and do not error
out when it's written to by the user. Thus, the old implementation
was POSIX-compliant in this regard. By the way, dash allows manually
setting PWD without any error.
However it is indeed better to provide an error message. I think making
the assignment fail is reasonable.
a2d4b7f..05fed9a master -> master