[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding the dump

From: Paul Eggert
Subject: Re: Finding the dump
Date: Thu, 31 Jan 2019 18:09:11 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/31/19 4:23 PM, Richard Stallman wrote:
If the program wants to relaunch itself, or find other files that correspond
to its executable file, it should check @code{argv[0]}.  If that string
contains a slash, it is the file name of the executable and its directory
part says where to find other related files.

If there is no slash, you should search for the executable in the
directories in @envvar{PATH}, and other related files should be in
the installation directory for the program's version.
@c ??? Someone please add a cross reference to info about that.

Any program that needs to know the location of its executable or that
of other associated files should offer the user an option to specify
another location.

This looks good, except that it's not clear that the guideline is a convention that is not enforced by the operating system. Perhaps append something like the following?

"Such an option can be useful when @code{argv[0]} does not follow the usual convention for naming the executable file."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]