prelink should not mess with running executables

Michal Schmidt mschmidt at redhat.com
Wed Jul 18 08:34:52 UTC 2012


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


More information about the devel mailing list