TIL you can get the path to the current executable with getauxval(AT_EXECFN) on Linux, no messing with /proc necessary. It's a separate block of memory filled by the kernel, not argv[0] or anything.
Keep in mind that on Linux systems it's entirely possible to run a binary from a path that cannot be accessed from the root of the mount tree (any more). Chroot comes to mind. I'm sure there are others.
-
-
This Tweet is unavailable.
-
That too, combined with fexecve. I think /proc/self/exe would still work in these cases.
End of conversation
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.