Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: get_progname and .exe suffix


  • From: Andrew Dunstan <andrew(at)dunslane(dot)net>
  • To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • Cc: pgsql-hackers-win32 <pgsql-hackers-win32(at)postgresql(dot)org>
  • Subject: Re: get_progname and .exe suffix
  • Date: Sat, 16 Oct 2004 12:35:41 -0400
  • Message-id: <41714DDD(dot)4080007(at)dunslane(dot)net>



Tom Lane wrote:

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
I posted on -hackers the other day about get_progname returning a name with the .exe suffix.

What would break if we caused get_progname itself to strip the suffix?
That would be a nice localized fix if it worked ...

Yes. get_progname() actually just returns a pointer to one past the last directory separator it finds in its argument string. Having it strip the .exe directly would in effect involve mangling argv[0]. That's what makes me slightly nervous about it. We could have it strdup() the result and then mangle that - note that it is called by postmaster before we set up any memory context stuff.


cheers

andrew



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group