Yes, what Roxen does I can modify :-) but it's conceivable that other apps would require updating to pass additional parameters when starting a hard-linked Pike.
To solve that I'd have to rely on the Master Cookie first; only if it's invalid I'd resort to query the OS for the current location. This in turn may have weird side-effects if the Pike installation is duplicated instead of moved as it would find the original tree (that probably only concerns developers though).
By the way, this is the code that locates the process binary on Darwin (minus error checking). If the same can be achieved on Linux etc I'm interested in learning about it.
#include <mach-o/dyld.h> NSSymbol s = NSLookupAndBindSymbol("_main"); NSModule m = NSModuleForSymbol(s); char *path = NSNameOfModule(m);