On Mon, 2011-04-11 at 22:50 +0200, Michael Thayer wrote: > On Mon, 2011-04-11 at 16:35 +0200, Damjan Jovanovic wrote: [...] > > 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. Still doesn't help for libraries of course.
Regards, Michael -- ORACLE Deutschland B.V. & Co. KG Michael Thayer Werkstrasse 24 VirtualBox engineering 71384 Weinstadt, Germany mailto:[email protected] 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 _______________________________________________ xdg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xdg
