| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Chris Travers <chris(dot)travers(at)adjust(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Proposal for Signal Detection Refactoring |
| Date: | 2018-09-25 02:26:12 |
| Message-ID: | 20180925022612.GF1354@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| Attachment | Content-Type | Size |
|---|---|---|
| pending-sig-atomic.patch | text/x-diff | 1.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2018-09-25 02:39:40 | Re: Proposal for Signal Detection Refactoring |
| Previous Message | Thomas Munro | 2018-09-25 02:20:23 | Re: DNS SRV support for LDAP authentication |