On 07/18/2012 12:35 AM, Sam Varshavchik wrote:
Really? An example of a "symbolic link pointing to a non-existent
pathname"?
lrwxrwxrwx. 1 root root 15 Jul 17 18:02 /dev/stderr → /proc/self/fd/2
lrwxrwxrwx. 1 root root 15 Jul 17 18:02 /dev/stdin → /proc/self/fd/0
lrwxrwxrwx. 1 root root 15 Jul 17 18:02 /dev/stdout → /proc/self/fd/1
You mean to tell me that none of those symlinks exist? Could've fooled me:
Cut the sarcasm.
In your example they existed, but generally they do not have to. Try this:
$ while :; do echo hello; sleep 10; done > /tmp/dumbdumbdumb &
[1] 32595
$ rm /tmp/dumbdumbdumb
$ readlink /proc/32595/fd/1
/tmp/dumbdumbdumb (deleted)
$ cat /proc/32595/fd/1
hello
hello
See? We have an actual magical symlink that points to a non-existing
path and yet it can still be opened.
Michal
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel