pgpool2.git / summary / log / commit / refs

commit    abcff550b1930f1e02b69f3f844eb071d3b18ec8
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Sun Jan 12 05:22:37 2025 +0000

    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.


src/utils/pool_signal.c | 4 +--- 1 file changed, 1 insertion(+), 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; [parent: 08c6268d5bb0]