lkml.org 
[lkml]   [1996]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectBug in tcsh or procfs?

I was poking around doing stupid things with /proc and found the
following:

omicron:/# cd /proc/1
omicron:/proc/1# ls -l root
lrwx------ 1 root root 64 Dec 18 23:38 root -> [0302]:2
omicron:/proc/1# ls --inode -L -d root
2 root/
omicron:/proc/1/root# cd root
omicron:/proc/1/root# pwd
/
omicron:/proc/1/root# ls
System.map . . .
omicron:/proc/1/root# ls --inode -L -d .
2 ./
omicron:/proc/1/root# cd ..
omicron:/proc/1# pwd
/
omicron:/proc/1# ls
System.map . . .
omicron:/proc/1# ls --inode -L -d .
2 ./
omicron:/proc/1# cd ..
omicron:/proc# pwd
/
omicron:/proc# ls
System.map . . .
omicron:/proc# ls --inode -L -d .
2 ./

I find this highly peculiar, though I just realized that it could be tcsh
doing some tricks here. cd is a builtin, meaning that tcsh does it own
internal hacking of it's pwd. It could be that the pwd buffer isn't
getting managed properly. But when I do a 'set symlinks=chase' I get:

omicron:/proc/1# cd root
cd: No match.
omicron:/proc/1# ls
System.map . . .
omicron:/proc/1# pwd
/
omicron:/proc/1# cd ..
omicron:/proc/1# ls
System.map . . .
omicron:/proc/1# cd ..
omicron:/proc#

...ad infinitum as above. Settings symlinks=expand works perfectly, going
into /proc/1/root and coming back out cleanly. bash does things correctly
in its default configuration.

...so... Any ideas as to what's happenning? Seems like a shell bug to
me, but is it fingering anything in the proc filesystem?

TTYAL,
Omega

Erik Walthinsen - Programmer, webmaster, 3D artist, etc. __
__ / /\
/ \ omega@sequent.com Work: (503)578-5314 / / \
| | M E G A omega@teleport.com Home: (503)281-4281 / / /\ \
_\ /_ psu12113@odin.cc.pdx.edu Majoring in CS / / /\ \ \
/ /_/__\ \ \
Omega Station: http://www.teleport.com/~omega/ /________\ \ \
Info on Linux, Graphics, Descent, Laptops, etc. \___________\/


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.392 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site