Re: Abolute path of argv[0]

stork_at_storkyak.com
Date: 11/12/05


Date: 12 Nov 2005 05:59:47 -0800


>Please rethink what you would like to do. There is no good reason to do
>this and many good reasons not to.

This is a bit of a Windows convention... you could have an application
cd to itself so that it can find data files associated with it. For
example, if my application were installed in Program Files \ Mightyware
\ Commodity Server \, I can chdir("config") to get the configuration
file that goes with it. This is particularly useful to do in an
environment where a "root path" does not exist. [Drive letters again!]

It -seems- like all configuration files live in etc for a system so
that... in other words, do correct me if I'm wrong as I'm a Linux Noob
myself, but under Linux when an apps installs its libraries go to \lib,
its "executable" goes to \usr, and its configuration stuff goes in
\etc, and user data goes into \home\usrname, and all of this is by
convention and there is no need to cd in your application because you
can just use the straight up path to your configuration and other
files.

Correct?



Relevant Pages

  • Re: awstats munged httpd rights in SElinux, how to fix?
    ... does your's have a reason? ... Elinks is a text-only web browser, ... It's another of those read the manual / read the configuration file / ... One thing that annoys me about them both, is the referrer stats. ...
    (Fedora)
  • Re: ZA activité & log
    ... I didn't ask for a different protection ... configuration. ... I've almost everything AND ZoneAlarm. ... I just asked the reason why the computer tried to answer to the massive ...
    (comp.security.firewalls)
  • [opensuse] Re: [opensuse-amd64] Some problems after upgrading to 10.2
    ... For some reason, rpm seems to consume over 99% of the CPU time. ... If I invoke yast from inside KDE as a normal user, ... from the command line, the very same password is recognized. ... you make sure you did an on-line update configuration. ...
    (SuSE)
  • Re: Profiling a murderer
    ... if the reason for this behaviour is ... IBM did not trust third party producers, or it was not always possible, to ... configuration as opposed to manual configuration with jumpers, ... has not become the strictly general behaviour. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: Reintroducing... my new PC!
    ... and 2) that configuration let me hang onto the 10.0.0.x ... for the same reason*;-). ... chucked out into the trash (although neither the 486 nor the GUS Max ... Just because I have fond memories of it doesn't mean I ...
    (rec.games.computer.ultima.dragons)