[Top][All Lists]

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

Re: determining the program_invocation_name

From: Bastien ROUCARIES
Subject: Re: determining the program_invocation_name
Date: Sat, 25 Dec 2010 17:57:57 +0100

On Sat, Dec 25, 2010 at 5:32 PM, Bruno Haible <address@hidden> wrote:
> Hello Bastien,
>> We could at least in all the case implement getprogname/setprogname
>> what is a well known api
> We can implement something _similar_ to getprogname. But it won't be
> the same API, because
>  - our function can return NULL,
According to my man page:
The getprogname function returns the name of the program. If the name
has not been set yet, it will return NULL.

>  - our function can return a truncated value,
Better then nothing

>  - there will be no function that corresponds to setprogname(),
>    because the point of this exercise is to avoid the 'progname' module.

Agreed but it does not cost a lot to be bsd compatible

>> and in gnulib error use the maximal
>> information possible to get full program name.
> This would mean that the error message from error() looks different
> according to the OS:
>  - no directory shown on *BSD, HP-UX, IRIX, OSF/1,
Only on IRIX actually and I have not hard searching I believe it is
possible to get it (see previous mail)

Last point are agreed.

reply via email to

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