Bug with $cwd in 4.2BSD csh
chris
chris at pixutl.UUCP
Tue Oct 9 02:09:10 AEST 1984
The following changes to 'sh.dir.c' will take care of the problem:
1) in dfollow(),
1.1) add this declaration:
char *realdname();
1.2) before 'dcanon(cp);' insert:
cp = realdname(cp);
2) then add this routine:
char *
realdname(d)
char *d;
{
struct stat st;
char *getwd();
char path[BUFSIZ];
lstat(d, &st);
if((st.st_mode & S_IFMT) != S_IFLNK)
return(d);
printd = 1;
return(savestr(getwd(path)));
}
--
Chris Bertin : (617) 657-8720 x2318
Pixel Computer Inc. :
260 Fordham Rd. : {allegra|ihnp4|cbosgd|ima|genrad|amd|harvard}\
Wilmington, Ma 01887 : !wjh12!pixel!pixutl!chris
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list