mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Use signalfd(2) for epoll latches.
Cut down on system calls and other overheads by reading from a signalfd instead of using a signal handler and self-pipe. Affects Linux sytems, and possibly others including illumos that implement the Linux epoll and signalfd interfaces. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@mail.gmail.com
This commit is contained in:
@@ -35,13 +35,15 @@ sigset_t UnBlockSig,
|
||||
* collection; it's essentially BlockSig minus SIGTERM, SIGQUIT, SIGALRM.
|
||||
*
|
||||
* UnBlockSig is the set of signals to block when we don't want to block
|
||||
* signals (is this ever nonzero??)
|
||||
* signals.
|
||||
*/
|
||||
void
|
||||
pqinitmask(void)
|
||||
{
|
||||
sigemptyset(&UnBlockSig);
|
||||
|
||||
/* Note: InitializeLatchSupport() modifies UnBlockSig. */
|
||||
|
||||
/* First set all signals, then clear some. */
|
||||
sigfillset(&BlockSig);
|
||||
sigfillset(&StartupBlockSig);
|
||||
|
||||
Reference in New Issue
Block a user