Absolute path in argv[0]

From: Otto Wyss (otto.wyss_at_orpatec.ch)
Date: 10/29/04


Date: Fri, 29 Oct 2004 18:12:49 +0200

When an application is started in argv[0] the path and name to its file
is returned. Unfortunately when started through the PATH variable it
contains only the name, the path is always empty. Since the PATH can
contain multiple directories the application's path can't be determined.
So how can this application's path (the path where it's started) be
retrieved?

Is there a setting anywhere which forces the automatic resolve of the
application's path so always the absolute path is returned in argv[0]?

If such a setting doesn't exist where does it have to be implemented? Is
this a kernel function or is there a loader which starts the
application.

O. Wyss

-- 
See a huge pile of work at "http://wyodesktop.sourceforge.net/"


Relevant Pages

  • Absolute path in argv[0]
    ... this a kernel function or is there a loader which starts the ... O. Wyss ... See a huge pile of work at "http://wyodesktop.sourceforge.net/ " ...
    (comp.unix.programmer)
  • Re: Adventures in Tractoring...an amusing tale. (long)
    ... the pile instead of the bottom where it blocks everyone else out of the ... the loader to move the pile from the front to the back and stack it up to ... Jim had helpfully attached the pallet forks to the tractor so if a big ...
    (rec.equestrian)
  • Adventures in Tractoring...an amusing tale. (long)
    ... Otherwise known as the loader learning curve... ... the loader to move the pile from the front to the back and stack it up to ... Jim had helpfully attached the pallet forks to the tractor so if a big ... I drive very slowly forward and lower my bucket. ...
    (rec.equestrian)
  • Re: Honeybees and Tansy Ragwort...
    ... Cut the stem and then quickly dab to stem with glycophospate. ... With the sheer numbers involved, ... the manure pile by the wheelbarrow full. ... I work this pile with a front-end loader, ...
    (sci.agriculture.beekeeping)
  • GCVS resets write access for user
    ... Whenever I commit a file with gcvs to sourceforge.net CVS the access ... this annoying behaviour? ... O. Wyss ... See a huge pile of work at "http://wyodesktop.sourceforge.net/ " ...
    (Debian-User)