Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 24 Mar 2013 04:24:59 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: program_invocation_name

* Rich Felker <dalias@...ifal.cx> [2013-03-23 23:01:18 -0400]:
> > > for (s=t=argv[0]; *t; t++) if (*t=='/') s=t+1;
> > 
> > yes that makes sense assuming argv[0]!=0
> 
> I don't think argv[0]==0 is permitted, but if it is possible, we could
> add a check.

execl("./foo", (char*)0, (char*)0);

works here (argc==0 and argv[0]==0 in the executed process)

> > > P.S. If we do add these, we could certainly add the BSD names too as
> > > aliases.
> > 
> > bsd only has the short version (__progname)
> 
> Doesn't it also have __progname_full or something?

no, that's a gnu invention, added at the same time
as the program_invocation_name things

but yes we should probably support both if we support any

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.