Subject: Re: [RFC] Cleaning up die() error messages

From: "H. Peter Anvin" <[email-masked]>
Date: Tue, 11 Oct 2005 09:11:11 -0700

Alex Riesen wrote:
> On 10/10/05, Elfyn McBratney <[email-masked]> wrote:
> 
>>        int main (int argc, char **argv)
>>        {
>>                set_prog_name(argv[0]);
> 
> 
> I'd also use readlink on /proc/self/exe by default (if set_prog_name
> _not_ called).
> It simplifies the code at least on linux, and makes possible very slow
> transition for other platforms. So you don't have to update each and
> every .c file containing "main[[:space:]]*(" ;)

It's really better just to put the stuff at the beginning of each main. 
  If that's too annoying, librarize main and rename your mains "git_main".

	-hpa