Thomas Munro <thomas.munro@gmail.com> writes:
> On Sat, Apr 17, 2021 at 12:46 AM Tom Lane <tgl@sss.pgh.pa.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