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:
1 parent
31c27a9c65
commit
c00e11df85
1 file changed
+1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user