4 ms·
Note though that both of these solutions are racy and so should not be done if "someone symlinking really fast and swapping the binaries" is in your threat mode
by sweetjuly 2y ago
Note though that both of these solutions are racy and so should not be done if "someone symlinking really fast and swapping the binaries" is in your threat model. Linux proc/self is safe though, just not the result from readlink.
- duped 2y agoWell that's true, but also something that can't be addressed within a currently running process afaik.