summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuo Ishii2025-01-12 05:22:37 +0000
committerTatsuo Ishii2025-01-12 05:22:37 +0000
commitabcff550b1930f1e02b69f3f844eb071d3b18ec8 (patch)
tree4a35998a817d08b97dd89447b807cf6d411f028e /src
parent08c6268d5bb0392959efe4dfcc8f1b51e83969b4 (diff)
Fix pool_signal.
Previously pool_signal did not set SA_RESTART flag. Thus any system calls interrupted by a signal does not restart. Some of our code are prepared so that they restart if a system call is interrupted by a signal. But not sure all places are prepared too. So add the flag. Note, PostgreSQL always uses the flag.
Diffstat (limited to 'src')
-rw-r--r--src/utils/pool_signal.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/utils/pool_signal.c b/src/utils/pool_signal.c
index c4cdd6db1..f30493ae2 100644
--- a/src/utils/pool_signal.c
+++ b/src/utils/pool_signal.c
@@ -145,9 +145,7 @@ pool_signal(int signo, pool_sighandler_t func)
act.sa_handler = func;
sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
- if (signo != SIGALRM)
- act.sa_flags |= SA_RESTART;
+ act.sa_flags = SA_RESTART;
#ifdef SA_NOCLDSTOP
if (signo == SIGCHLD)
act.sa_flags |= SA_NOCLDSTOP;