Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30829e5 commit 1f0019dCopy full SHA for 1f0019d
src/backend/storage/ipc/latch.c
@@ -283,6 +283,22 @@ InitializeLatchSupport(void)
283
#ifdef WAIT_USE_SIGNALFD
284
sigset_t signalfd_mask;
285
286
+ if (IsUnderPostmaster)
287
+ {
288
+ /*
289
+ * It would probably be safe to re-use the inherited signalfd since
290
+ * signalfds only see the current process's pending signals, but it
291
+ * seems less surprising to close it and create our own.
292
+ */
293
+ if (signal_fd != -1)
294
295
+ /* Release postmaster's signal FD; ignore any error */
296
+ (void) close(signal_fd);
297
+ signal_fd = -1;
298
+ ReleaseExternalFD();
299
+ }
300
301
+
302
/* Block SIGURG, because we'll receive it through a signalfd. */
303
sigaddset(&UnBlockSig, SIGURG);
304
0 commit comments