diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c index 659bd50da7d93f4730af7789fc02e9404a15c92c..11615eb438b81bcccaac16ce8e93106e99c8ffdb 100644 --- a/contrib/pg_standby/pg_standby.c +++ b/contrib/pg_standby/pg_standby.c @@ -549,7 +549,7 @@ sighandler(int sig) static void sigquit_handler(int sig) { - signal(SIGINT, SIG_DFL); + pqsignal(SIGINT, SIG_DFL); kill(getpid(), SIGINT); } #endif @@ -592,9 +592,9 @@ main(int argc, char **argv) * * There's no way to trigger failover via signal on Windows. */ - (void) signal(SIGUSR1, sighandler); - (void) signal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */ - (void) signal(SIGQUIT, sigquit_handler); + (void) pqsignal(SIGUSR1, sighandler); + (void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */ + (void) pqsignal(SIGQUIT, sigquit_handler); #endif while ((c = getopt(argc, argv, "cdk:lr:s:t:w:")) != -1) diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c index 5ee03981a3bf5281ebc3c1b010bc45edd3136ad0..7bc0d0e5fd9cdefb39a695bf93f55e56ceba73ad 100644 --- a/contrib/pg_test_fsync/pg_test_fsync.c +++ b/contrib/pg_test_fsync/pg_test_fsync.c @@ -101,14 +101,14 @@ main(int argc, char *argv[]) handle_args(argc, argv); /* Prevent leaving behind the test file */ - signal(SIGINT, signal_cleanup); - signal(SIGTERM, signal_cleanup); + pqsignal(SIGINT, signal_cleanup); + pqsignal(SIGTERM, signal_cleanup); #ifndef WIN32 - signal(SIGALRM, process_alarm); + pqsignal(SIGALRM, process_alarm); #endif #ifdef SIGHUP /* Not defined on win32 */ - signal(SIGHUP, signal_cleanup); + pqsignal(SIGHUP, signal_cleanup); #endif prepare_buf();