Look into 2.1.49.
It displays a "(deleted)" after the filename if the file is deleted (so
you know that the name is really only a "hint" - but it does tell you on
which filesystem the file is open, for example, which is valid information
worth getting. Think "fuser").
And yes, when you actually open the file through the /proc filesystem you
_will_ get the correct (deleted) file even though the link displayed by
"ls -l" isn't a valid name any more.
Example:
[torvalds@penguin torvalds]$ echo hello > hello ; ( rm hello ; ls -l /proc/self/fd ; cat /proc/self/fd/0 ) < hello
total 0
-> lr-x------ 1 torvalds torvalds 64 Aug 12 10:54 0 -> /export/home/penguin/torvalds/hello (deleted)
lrwx------ 1 torvalds torvalds 64 Aug 12 10:54 1 -> /dev/ttyp0
lrwx------ 1 torvalds torvalds 64 Aug 12 10:54 2 -> /dev/ttyp0
lr-x------ 1 torvalds torvalds 64 Aug 12 10:54 3 -> /proc/22193/fd
-> hello
[torvalds@penguin torvalds]$
Notice how the "cat /proc/self/fd/0" still works, even though the file is
deleted (and shows up as "(deleted)" in the /proc listing).
Yes, it's cool.
Linus