Re: Call for objections: deprecate postmaster -o switch?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Call for objections: deprecate postmaster -o switch?
Дата
Msg-id 7172.1006736667@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Call for objections: deprecate postmaster -o switch?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> No it's not, unfortunately.  BSD versions of getopt, including the one we
> ship as replacement, have a bug that considers any argument that starts
> with '--' to be equivalent with '--' (which means end of options).

I believe we could trivially fix our substitute version: at line 74 of
src/utils/getopt.c,
    if (place[1] && *++place == '-')

should be
    if (place[1] && *++place == '-' && place[1] == '\0')

It might still not work on older BSDen, but there's no reason it
shouldn't work on platforms where we use our own code.

A slightly more aggressive answer would be to use our own code always,
or to test for brokenness of the system getopt in configure and use our
own code if so.
        regards, tom lane


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: Security note: MS SQL is current worm vector
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Call for objections: deprecate postmaster -o switch?