修复SIGUSR2信号屏蔽丢失引起的死锁问题

This commit is contained in:
hemny
2023-09-06 20:13:40 +08:00
parent 321133e2ad
commit acd9bf5f3c
2 changed files with 3 additions and 3 deletions

View File

@ -612,7 +612,7 @@ static void CompltrConfig(SIGNAL_ARGS)
*/
static void CompltrQuickDie(SIGNAL_ARGS)
{
PG_SETMASK(&t_thrd.libpq_cxt.BlockSig);
gs_signal_setmask(&t_thrd.libpq_cxt.BlockSig, NULL);
/*
* We DO NOT want to run proc_exit() callbacks -- we're here because

View File

@ -5662,7 +5662,7 @@ static void SIGHUP_handler(SIGNAL_ARGS)
*/
if (get_file_lock(gucconf_lock_file, &filelock) != CODE_OK) {
ereport(WARNING, (errmsg("the last sigup signal is processing,get file lock failed.")));
(void)PG_SETMASK(&t_thrd.libpq_cxt.UnBlockSig);
gs_signal_setmask(&t_thrd.libpq_cxt.UnBlockSig, NULL);
errno = save_errno;
return;
}
@ -5677,7 +5677,7 @@ static void SIGHUP_handler(SIGNAL_ARGS)
}
if (!get_locked) {
ereport(WARNING, (errmsg("the last sigup signal is processing,get file thread lock failed.")));
(void)PG_SETMASK(&t_thrd.libpq_cxt.UnBlockSig);
gs_signal_setmask(&t_thrd.libpq_cxt.UnBlockSig, NULL);
errno = save_errno;
return;
}