Todd C. Miller <mill...@openbsd.org> wrote: > CVSROOT: /cvs > Module name: src > Changes by: mill...@cvs.openbsd.org 2018/09/29 08:13:19 > > Modified files: > bin/ksh : main.c > > Log message: > Export the PWD and OLDPWD shell variables as per POSIX. > Previously, these would only be exported if they were present > in the environment when the shell started. OK deraadt@ anton@ kn@
This was discovered because emacs changes file-opening behaviour based on whether PWD is set or not, in a pretty crazy way, and in the presence of non-reachable directories (meaning getcwd() fails), will then refuse to open files.