Absolute path in argv[0]
From: Otto Wyss (otto.wyss_at_orpatec.ch)
Date: 10/29/04
- Next message: Måns Rullgård: "Re: Absolute path in argv[0]"
- Previous message: Bill Unruh: "Re: root can't write to /bin, /sbin, or /usr/sbin"
- Next in thread: Måns Rullgård: "Re: Absolute path in argv[0]"
- Reply: Måns Rullgård: "Re: Absolute path in argv[0]"
- Reply: Douglas O'Neal: "Re: Absolute path in argv[0]"
- Reply: Rich Teer: "Re: Absolute path in argv[0]"
- Reply: Grant Edwards: "Re: Absolute path in argv[0]"
- Reply: Lew Pitcher: "Re: Absolute path in argv[0]"
- Reply: Jeffrey Froman: "Re: Absolute path in argv[0]"
- Maybe reply: Robert Heller: "Re: Absolute path in argv[0]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/"
- Next message: Måns Rullgård: "Re: Absolute path in argv[0]"
- Previous message: Bill Unruh: "Re: root can't write to /bin, /sbin, or /usr/sbin"
- Next in thread: Måns Rullgård: "Re: Absolute path in argv[0]"
- Reply: Måns Rullgård: "Re: Absolute path in argv[0]"
- Reply: Douglas O'Neal: "Re: Absolute path in argv[0]"
- Reply: Rich Teer: "Re: Absolute path in argv[0]"
- Reply: Grant Edwards: "Re: Absolute path in argv[0]"
- Reply: Lew Pitcher: "Re: Absolute path in argv[0]"
- Reply: Jeffrey Froman: "Re: Absolute path in argv[0]"
- Maybe reply: Robert Heller: "Re: Absolute path in argv[0]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|