[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getprogname
From: |
Paul Eggert |
Subject: |
Re: getprogname |
Date: |
Tue, 10 Jan 2006 23:16:40 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> Paul Eggert wrote:
>> This isn't as compatible as possible with BSD, as BSD setprogname
>> ignores its argument when the true program name is available from
>> the operating system.
>
> Huh? My reading of the sources of FreeBSD and NetBSD is just the
> opposite: Whatever may the initial value of __progname be, it is
> erased when setprogname is called.
Hmm, no, actually they differ. NetBSD agrees with me and FreeBSD with
you. (See the REALLY_SET_PROGNAME macro in the NetBSD
implementation.) Ouch.
I was assuming NetBSD, since it introduced the feature. Also,
<http://netbsd.gw.com/cgi-bin/man-cgi?getprogname++NetBSD-current>
says "in NetBSD, calling setprogname() from main() has no effect."
> Which is also reasonable: you want to allow an application to override
> system behaviour, not the other way around.
Since there's conflicting practice we might as well do the reasonable
thing, yes. (But I wonder why NetBSD went to the trouble of doing it
that way?)
- Re: [bug-gnulib] Re: use of program_name, (continued)
- Re: [bug-gnulib] Re: use of program_name, Bruno Haible, 2006/01/09
- use of -fno-common on Darwin (was: use of program_name), Ralf Wildenhues, 2006/01/09
- Re: use of -fno-common on Darwin, Peter O'Gorman, 2006/01/09
- Re: use of -fno-common on Darwin, Paul Eggert, 2006/01/09
- Re: use of -fno-common on Darwin, Bob Friesenhahn, 2006/01/10
- Re: use of -fno-common on Darwin, Bruno Haible, 2006/01/10
- Re: use of -fno-common on Darwin, Peter O'Gorman, 2006/01/10
- Re: getprogname, Bruno Haible, 2006/01/10
- Re: getprogname, Paul Eggert, 2006/01/10
- Re: getprogname, Bruno Haible, 2006/01/10
- Re: getprogname,
Paul Eggert <=
- Re: use of -fno-common on Darwin, James Youngman, 2006/01/10
- Re: getprogname, Bruno Haible, 2006/01/11
- Re: getprogname, Paul Eggert, 2006/01/11
- Re: [bug-gnulib] Re: use of program_name, Bruno Haible, 2006/01/09
- Re: use of program_name, James Youngman, 2006/01/05
- Re: [bug-gnulib] Re: use of program_name, Bruno Haible, 2006/01/09
- Re: [bug-gnulib] Re: use of program_name, James Youngman, 2006/01/09
- Re: use of program_name, Dave Love, 2006/01/05
- Re: [bug-gnulib] Re: use of program_name, Bruno Haible, 2006/01/09
- Re: [bug-gnulib] Re: use of program_name, Bruno Haible, 2006/01/09