Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.
Дата
Msg-id 40654.1618606161@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-committers
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



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Allow TestLib::slurp_file to skip contents, and use as needed