aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/postmaster.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
-rw-r--r--src/backend/postmaster/postmaster.c57
1 files changed, 4 insertions, 53 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 0b637ba6a2a..1da5752047f 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -620,10 +620,10 @@ PostmasterMain(int argc, char *argv[])
* is used by all child processes and client processes). That has a
* couple of special behaviors:
*
- * 1. Except on Windows, we tell sigaction() to block all signals for the
- * duration of the signal handler. This is faster than our old approach
- * of blocking/unblocking explicitly in the signal handler, and it should
- * also prevent excessive stack consumption if signals arrive quickly.
+ * 1. We tell sigaction() to block all signals for the duration of the
+ * signal handler. This is faster than our old approach of
+ * blocking/unblocking explicitly in the signal handler, and it should also
+ * prevent excessive stack consumption if signals arrive quickly.
*
* 2. We do not set the SA_RESTART flag. This is because signals will be
* blocked at all times except when ServerLoop is waiting for something to
@@ -2726,14 +2726,6 @@ SIGHUP_handler(SIGNAL_ARGS)
{
int save_errno = errno;
- /*
- * We rely on the signal mechanism to have blocked all signals ... except
- * on Windows, which lacks sigaction(), so we have to do it manually.
- */
-#ifdef WIN32
- PG_SETMASK(&BlockSig);
-#endif
-
if (Shutdown <= SmartShutdown)
{
ereport(LOG,
@@ -2790,10 +2782,6 @@ SIGHUP_handler(SIGNAL_ARGS)
#endif
}
-#ifdef WIN32
- PG_SETMASK(&UnBlockSig);
-#endif
-
errno = save_errno;
}
@@ -2806,14 +2794,6 @@ pmdie(SIGNAL_ARGS)
{
int save_errno = errno;
- /*
- * We rely on the signal mechanism to have blocked all signals ... except
- * on Windows, which lacks sigaction(), so we have to do it manually.
- */
-#ifdef WIN32
- PG_SETMASK(&BlockSig);
-#endif
-
ereport(DEBUG2,
(errmsg_internal("postmaster received signal %d",
postgres_signal_arg)));
@@ -2938,10 +2918,6 @@ pmdie(SIGNAL_ARGS)
break;
}
-#ifdef WIN32
- PG_SETMASK(&UnBlockSig);
-#endif
-
errno = save_errno;
}
@@ -2955,14 +2931,6 @@ reaper(SIGNAL_ARGS)
int pid; /* process id of dead child process */
int exitstatus; /* its exit status */
- /*
- * We rely on the signal mechanism to have blocked all signals ... except
- * on Windows, which lacks sigaction(), so we have to do it manually.
- */
-#ifdef WIN32
- PG_SETMASK(&BlockSig);
-#endif
-
ereport(DEBUG4,
(errmsg_internal("reaping dead processes")));
@@ -3255,11 +3223,6 @@ reaper(SIGNAL_ARGS)
*/
PostmasterStateMachine();
- /* Done with signal handler */
-#ifdef WIN32
- PG_SETMASK(&UnBlockSig);
-#endif
-
errno = save_errno;
}
@@ -5107,14 +5070,6 @@ sigusr1_handler(SIGNAL_ARGS)
int save_errno = errno;
/*
- * We rely on the signal mechanism to have blocked all signals ... except
- * on Windows, which lacks sigaction(), so we have to do it manually.
- */
-#ifdef WIN32
- PG_SETMASK(&BlockSig);
-#endif
-
- /*
* RECOVERY_STARTED and BEGIN_HOT_STANDBY signals are ignored in
* unexpected states. If the startup process quickly starts up, completes
* recovery, exits, we might process the death of the startup process
@@ -5254,10 +5209,6 @@ sigusr1_handler(SIGNAL_ARGS)
signal_child(StartupPID, SIGUSR2);
}
-#ifdef WIN32
- PG_SETMASK(&UnBlockSig);
-#endif
-
errno = save_errno;
}