The assumption that /proc/self/exe always exists is incorrect.
authorSylvestre Ledru <sylvestre@debian.org>
Wed, 26 Sep 2012 08:30:35 +0000 (08:30 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 26 Sep 2012 08:30:35 +0000 (08:30 +0000)
commitbec3ce0cb50895d9b41a78938b079672e6999e15
tree2116826fd6c0c5dacf850d7d5baf08e71270d7ad
parent4fa2ddbb94bb7b7f67e4f4d0aac292998fbf00ed
The assumption that /proc/self/exe always exists is incorrect.
For example, under a Linux chroot, /proc/ might not be mounted.
Therefor, we test if this file exist. If it is the case, use it (the current
behavior). Otherwise, we fall back to the detection used by *BSD.

The issue has been reported initially on the Debian bug tracker:
http://bugs.debian.org/674588

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164676 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Unix/Path.inc