On Saturday 07 January 2006 16:34, Randall R Schulz wrote:
That's not really correct. The entries in /proc/pid/fd are symbolic links and symlinks cannot prevent their targets from being removed.
That should tell you they're not symlinks then. I know they look like symlinks, but a quick test would have told you they don't behave like them ~> echo foo > test.txt ~> ln -s test.txt test2.txt ~> cat test2.txt foo ~> rm test.txt ~> cat test2.txt cat: test2.txt: No such file or directory ~> echo foo > test.txt ~> less test.txt (in new shell) ~> ls -l /proc/10125/fd total 5 lrwx------ 1 andjoh users 64 2006-01-08 00:07 0 -> /dev/pts/6 lrwx------ 1 andjoh users 64 2006-01-08 00:07 1 -> /dev/pts/6 lrwx------ 1 andjoh users 64 2006-01-08 00:07 2 -> /dev/pts/6 lr-x------ 1 andjoh users 64 2006-01-08 00:07 3 -> /dev/tty lr-x------ 1 andjoh users 64 2006-01-08 00:07 4 -> /home/andjoh/test.txt ~> cat /proc/10125/fd/4 foo ~> rm /home/andjoh/test.txt ~> cat /proc/10125/fd/4 foo Things in /proc can't be taken at face value, they're not what they seem. It looks like a symlink, but it behaves like a hardlink