Valeri Galtsev galtsev@kicp.uchicago.edu wrote:
######## #!/bin/sh
readlink /proc/$$/file ########
( note that that "file" is because I'm using FreeBSD /proc, for Linux you may need to replace the line with something like:
readlink /proc/$$/exe
And on a platform that implements a correct procfs-2, you should look at:
/proc/self/path/a.out or /proc/$$/path/a.out
This seems to be unknown e.g. to people from the FSF, so many autoconf tests are wrong.
Jörg