Re: Proposal for Signal Detection Refactoring

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Proposal for Signal Detection Refactoring
Дата
Msg-id 20180925022612.GF1354@paquier.xyz
обсуждение исходный текст
Ответ на Re: Proposal for Signal Detection Refactoring  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Proposal for Signal Detection Refactoring  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Sep 24, 2018 at 09:38:11PM -0400, Tom Lane wrote:
> Yeah, in principle any global variable touched by a signal handler should
> be sig_atomic_t.  I don't know of any modern platform where using "bool"
> is unsafe, but per the C standard it could be.  The case that would be
> worrisome is if setting the variable requires a load/modify/store, which
> does apply to char-sized variables on some ancient platforms.  I think
> there's no need to worry for int-sized variables.

Let's change it then.  ClientConnectionLost needs also to be changed as
miscadmin.h tells that it could be used in a signal handler. What do you
think about the attached?
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: DNS SRV support for LDAP authentication
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Proposal for Signal Detection Refactoring