Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
The name.c change in that commit was ineffective at fixing the crash; I was misled by the crash being intermittent. The same crash in path_unsetfpath() continues to occur sometimes when FPATH is set in bin/package. This commit special-cases FPATH in sh_reinit(), which is used to (partially) reinitialise the shell after forking and before running a shell script without a hashbang path. It is a bit of a hack, but then again the entire sh_reinit() thing is a hack that I plan to get rid of eventually; for now, it just needs to not crash. src/cmd/ksh93/sh/name.c: sh_envnolocal(): - Revert the ineffective fix. src/cmd/ksh93/sh/init.c: sh_reinit(): - Before starting reinit, save FPATH's value if it has the export attribute, then unset FPATH. - After reinit is done, restore FPATH's value and export attribute if the value was saved. This should reinitialise sh.fpathdict. Fingers crossed...
- Loading branch information