git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Oct 11, 2005, 16:11 UTC
Message-ID
<434BE41F.4060909@zytor.com>
In-Reply-To
<81b0412b0510110802lbcdebe0m17bce7ca81ea76d2@mail.gmail.com>
Alex Riesen wrote:
Show 12 quoted lines
> On 10/10/05, Elfyn McBratney <beu@gentoo.org> 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
Previous: Alex Riesen
Message 13 of 13 in “[RFC] Cleaning up die() error messages”
  1. Elfyn McBratneyOct 10, 2005
  2. Junio C HamanoOct 10, 2005
  3. Matthias UrlichsOct 11, 2005
  4. H. Peter AnvinOct 11, 2005
  5. Matthias UrlichsOct 12, 2005
  6. H. Peter AnvinOct 12, 2005
  7. Junio C HamanoOct 12, 2005
  8. H. Peter AnvinOct 12, 2005
  9. Junio C HamanoOct 12, 2005
  10. Matthias UrlichsOct 12, 2005
  11. Daniel BarkalowOct 10, 2005
  12. Alex RiesenOct 11, 2005
  13. H. Peter AnvinOct 11, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.