> How did people get by without needing this in the last three decades? Just trying to be positive on a feature that would have interest for me. Nevermind.
It seems like most other unixes out there do have a way to retrieve the full path of a running program, mainly through /proc (be it /proc/pid/exe on Linux, or /proc/pid/path/a.out on Solaris (TBV). >From what I have understood there is no /proc anymore of OpenBSD, and these info are now accessible through sysctl, so I thought that would fit nicely for this feature too. > Since Unix operating systems don't have a way to do this in general, > how did this become part of the ld.so spec? It is part of the System V ELF gABI. Current description: http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#substitution Revision history available at: http://www.sco.com/developers/gabi/latest/revision.html It was added in 2nd draft from 1999 may 3: > New dynamic section tags DT_RUNPATH and DT_FLAGS added. Dynamic section tag DT_RPATH moved to level 2. > New semantics for shared object path searching, including new ``Substitution Sequences''. On Fri, Dec 11, 2015 at 11:32 PM, Theo de Raadt <dera...@cvs.openbsd.org> wrote: >> > It would be that or >> > have the kernel store the whole path for the life of the process for >> > obtaining with sysctl() >> >> That would be great. ps and top would be able to display the path too, >> pretty handy. > > How did people get by without needing this in the last three decades? -- Aurélien Vallée Phone +33 9 77 19 85 61