From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgsql: Use SIGURG rather than SIGUSR1 for latches. |
Date: | 2021-04-16 20:49:21 |
Message-ID: | 40654.1618606161@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Sat, Apr 17, 2021 at 12:46 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Is it really necessary to mess with UnBlockSig?
> It's necessary to keep it blocked, because, to quote signalfd(2):
> Normally, the set of signals to be received via the file descriptor
> should be blocked using sigprocmask(2), to prevent the signals being
> handled according to their default dispositions.
Meh. OK.
(I would've thought that a SIG_IGN'd signal would be dropped
immediately even if blocked; that's the behavior that dummy_handler
is designed to prevent, and I'm pretty sure that that code is there
because we saw it actually behaving that way on some platforms.
But apparently not on Linux?)
> ... All the calls to set the
> disposition to SIG_IGN explicitly are probably unnecessary since
> that's the default disposition, but I figured that was somehow useful
> as documentation, and a place to hang a comment.
Agreed, I would not suggest removing those.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2021-04-16 21:42:14 | pgsql: Allow TestLib::slurp_file to skip contents, and use as needed |
Previous Message | Thomas Munro | 2021-04-16 20:38:35 | Re: pgsql: Use SIGURG rather than SIGUSR1 for latches. |