Re: get_progname and .exe suffix

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: get_progname and .exe suffix
Дата
Msg-id 8650.1097945846@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: get_progname and .exe suffix  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: get_progname and .exe suffix  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers-win32
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> What would break if we caused get_progname itself to strip the suffix?

> 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.

Seems reasonable.  What I was more worried about though was whether
there are any callers that actually need a non-stripped result.

            regards, tom lane

В списке pgsql-hackers-win32 по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: get_progname and .exe suffix
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: get_progname and .exe suffix