Backward-cpp currently finds the path to the executable by calling readlink("/proc/self/exe"). /proc/self/exe is a special file that normally acts like a symlink, but when the executable it links to has been deleted or replaced, calling readlink on it returns the path to the original executable with the string " (deleted)" appended, which is obviously not a valid path, and prevents Backward-cpp from working as a result. However, in that case, directly opening /proc/self/exe still lets you access the original executable file!
Backward-cpp should be directly opening /proc/self/exe rather than the file it links to in order to function correctly when the executable has been deleted or replaced.
Backward-cpp currently finds the path to the executable by calling
readlink
("/proc/self/exe")
./proc/self/exe
is a special file that normally acts like a symlink, but when the executable it links to has been deleted or replaced, callingreadlink
on it returns the path to the original executable with the string " (deleted)" appended, which is obviously not a valid path, and prevents Backward-cpp from working as a result. However, in that case, directly opening/proc/self/exe
still lets you access the original executable file!Backward-cpp should be directly opening
/proc/self/exe
rather than the file it links to in order to function correctly when the executable has been deleted or replaced.