Proposal: Add getFullProgName

Johan Tibell johan.tibell at
Wed Jun 13 03:21:25 CEST 2012

On Tue, Jun 12, 2012 at 5:59 PM, Thomas Schilling
<nominolo at> wrote:
> I don't think this is guaranteed to work.  See top answer here [1]
> (which cites the standard).  Also, note that the man page for exec and
> friends notes that the first argument *by convention* is the name of
> the executable.

That's right. argv[0] could be anything, including "my hair is on
fire". In this sense getFullProgName is as incorrect/correct as
getProgName. In practice it will be the program name and then
getFullProgName can be used to do useful work, other than printing the
program base name, unlike getProgName. :)

-- Johan

More information about the Libraries mailing list