diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 85f15a5..fff83b7 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -2640,8 +2640,6 @@ SIGHUP_handler(SIGNAL_ARGS)
 {
 	int			save_errno = errno;
 
-	PG_SETMASK(&BlockSig);
-
 	if (Shutdown <= SmartShutdown)
 	{
 		ereport(LOG,
@@ -2700,8 +2698,6 @@ SIGHUP_handler(SIGNAL_ARGS)
 #endif
 	}
 
-	PG_SETMASK(&UnBlockSig);
-
 	errno = save_errno;
 }
 
@@ -2714,8 +2710,6 @@ pmdie(SIGNAL_ARGS)
 {
 	int			save_errno = errno;
 
-	PG_SETMASK(&BlockSig);
-
 	ereport(DEBUG2,
 			(errmsg_internal("postmaster received signal %d",
 							 postgres_signal_arg)));
@@ -2880,8 +2874,6 @@ pmdie(SIGNAL_ARGS)
 			break;
 	}
 
-	PG_SETMASK(&UnBlockSig);
-
 	errno = save_errno;
 }
 
@@ -2895,8 +2887,6 @@ reaper(SIGNAL_ARGS)
 	int			pid;			/* process id of dead child process */
 	int			exitstatus;		/* its exit status */
 
-	PG_SETMASK(&BlockSig);
-
 	ereport(DEBUG4,
 			(errmsg_internal("reaping dead processes")));
 
@@ -3212,8 +3202,6 @@ reaper(SIGNAL_ARGS)
 	PostmasterStateMachine();
 
 	/* Done with signal handler */
-	PG_SETMASK(&UnBlockSig);
-
 	errno = save_errno;
 }
 
@@ -5114,8 +5102,6 @@ sigusr1_handler(SIGNAL_ARGS)
 {
 	int			save_errno = errno;
 
-	PG_SETMASK(&BlockSig);
-
 	/* Process background worker state change. */
 	if (CheckPostmasterSignal(PMSIGNAL_BACKGROUND_WORKER_CHANGE))
 	{
@@ -5272,8 +5258,6 @@ sigusr1_handler(SIGNAL_ARGS)
 		signal_child(StartupPID, SIGUSR2);
 	}
 
-	PG_SETMASK(&UnBlockSig);
-
 	errno = save_errno;
 }
 
diff --git a/src/port/pqsignal.c b/src/port/pqsignal.c
index ecb9ca2..93a039b 100644
--- a/src/port/pqsignal.c
+++ b/src/port/pqsignal.c
@@ -65,7 +65,11 @@ pqsignal(int signo, pqsigfunc func)
  *
  * On Windows, this would be identical to pqsignal(), so don't bother.
  */
-#ifndef WIN32
+#ifndef FRONTEND
+
+extern sigset_t UnBlockSig,
+			BlockSig,
+			StartupBlockSig;
 
 pqsigfunc
 pqsignal_no_restart(int signo, pqsigfunc func)
@@ -74,7 +78,7 @@ pqsignal_no_restart(int signo, pqsigfunc func)
 				oact;
 
 	act.sa_handler = func;
-	sigemptyset(&act.sa_mask);
+	act.sa_mask = BlockSig;
 	act.sa_flags = 0;
 #ifdef SA_NOCLDSTOP
 	if (signo == SIGCHLD)
