[Top][All Lists]

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

Re: [Bug-gnulib] Re: new module: progname

From: Bruno Haible
Subject: Re: [Bug-gnulib] Re: new module: progname
Date: Wed, 20 Aug 2003 21:32:52 +0200
User-agent: KMail/1.5

Paul Eggert wrote:

> Octave defines progam_invocation_name to be the full invocation name
> as invoked by the user (presumably gotten from argv[0], e.g.,
> "/usr/bin/foo"); it defines program_name to be its basename (e.g.,
> "foo").  See <http://octave.sourceforge.net/index/f/program_name.html>.

Hmm, but the current semantics of 'program_name' (through the common
"program_name = argv[0];" idiom) is that it _sometimes_ is the basename
and sometimes the full name of the program. On most Unices, argv[0] is
directly what is passed to the exec system call. On BeOS, argv[0] is
made absolute even if the evec first argument was relative...

In progname.c I keep the "program_name = argv[0];" semantics, except
that it undoes the trouble brought by libtool.


reply via email to

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