I found it useful to generalize .local

Michael Thayer michael.thayer at oracle.com
Mon Apr 11 13:50:40 PDT 2011


On Mon, 2011-04-11 at 16:35 +0200, Damjan Jovanovic wrote:
> On Mon, Apr 11, 2011 at 3:26 PM, Michael Thayer
> <michael.thayer at oracle.com> wrote:
[...]
> > Convention says that argv[0] should point to the executable.  If you are
> > going to modify an application anyway to support runtime prefix
> > discovery why not just make that a requirement (maybe with a default
> > path as a fallback) and let it be the caller's problem if they don't set
> > argv[0] as they should.  (Let's not discuss setuid here!)
[...]
> argv[0] doesn't work for libraries and isn't that easy even in
> non-setuid cases (you need to check for relative paths, then search
> $PATH, and convert relative paths to absolute). Alternatively why
> don't we add an API to POSIX for querying your own path? dladdr()
> already semi-works in special cases (-rdynamic), on OSs where it's
> available.
Somewhat off-topic by now, but implementing the relative/absolute bits
and the $PATH search as a function in a library seems like less effort
to me than getting POSIX changed, and the users would not have to wait
for all target OSes to adopt it.

Regards,

Michael
-- 
ORACLE Deutschland B.V. & Co. KG   Michael Thayer
Werkstrasse 24                     VirtualBox engineering
71384 Weinstadt, Germany           mailto:michael.thayer at oracle.com

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven



More information about the xdg mailing list