Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Дата
Msg-id 4E1A295E.9030103@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On 11/07/2011 4:23 AM, Peter Eisentraut wrote:
> I was going through the GetLastError() calls to unify the printf
> formats, as discussed, and I stumbled across this:
>
> +               write_stderr("could not write crash dump to %s: error code %08x\n",
> +                            dumpPath, GetLastError());
>
> Is there a reason why this uses that particular format, unlike all other
> call sites?
>

Other call site usages include:
 errmsg_internal("could not create signal event: %d", (int) GetLastError()) write_stderr("could not create signal
listenerpipe: error code %d; 
 
retrying\n", (int) GetLastError())

etc, so I presume you're referring to the use of %08x as a format 
specifier rather than %d ? The only reason is that ntstatus errors are 
typically reported this way - but, really, not all possible errors 
arising there would be ntstatus errors. As it's not consistent with the 
rest of Pg I don't see any reason not to change it to %d.

--
Craig Ringer

POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088     Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/


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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Kaigai's current patches -- review, commit status
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: reducing the overhead of frequent table locks, v4