Hiroshi Ito writes:

ash
   "unset OLDPWD; cd -"  causes segmentation fault.
    ( OLDPWD is not set when sh is invoked from getty. )

patch against current CVS is attached.
This commit is contained in:
Eric Andersen 2004-10-08 08:14:58 +00:00
parent 31c27a9c65
commit c00e11df85

View File

@ -2316,6 +2316,7 @@ cdcmd(int argc, char **argv)
dest = bltinlookup(homestr);
else if (dest[0] == '-' && dest[1] == '\0') {
dest = bltinlookup("OLDPWD");
if ( !dest ) goto out;
flags |= CD_PRINT;
goto step7;
}