in reply to Re^5: How to detect if file is in use?
in thread How to detect if file is in use?
Therefore, you can be sure that the paths in the proc filesystem aren't symlinks. Hard links are a harder problem. fuser seems to always get it right, though.$ perl -le 'symlink("foo","bar") o r die $!; open F, ">bar" or die $!; print readlink("/proc/$$/fd/".file +no(F))' /tmp/foo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: How to detect if file is in use?
by Tanktalus (Canon) on Mar 18, 2005 at 02:17 UTC | |
|
Re^7: How to detect if file is in use?
by gellyfish (Monsignor) on Mar 18, 2005 at 09:40 UTC |