aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/ipc/pmsignal.c2
-rw-r--r--src/bin/initdb/initdb.c6
-rw-r--r--src/bin/pg_basebackup/pg_receivewal.c2
-rw-r--r--src/bin/pg_basebackup/pg_recvlogical.c4
-rw-r--r--src/bin/pg_ctl/pg_ctl.c6
-rw-r--r--src/bin/pg_test_fsync/pg_test_fsync.c10
-rw-r--r--src/bin/pg_waldump/pg_waldump.c2
-rw-r--r--src/include/port.h2
-rw-r--r--src/test/regress/pg_regress.c6
9 files changed, 20 insertions, 20 deletions
diff --git a/src/backend/storage/ipc/pmsignal.c b/src/backend/storage/ipc/pmsignal.c
index 1c668d183c2..3f0ec5e6b82 100644
--- a/src/backend/storage/ipc/pmsignal.c
+++ b/src/backend/storage/ipc/pmsignal.c
@@ -88,7 +88,7 @@ NON_EXEC_STATIC volatile PMSignalData *PMSignalState = NULL;
volatile sig_atomic_t postmaster_possibly_dead = false;
static void
-postmaster_death_handler(int signo)
+postmaster_death_handler(SIGNAL_ARGS)
{
postmaster_possibly_dead = true;
}
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index e00837ecacf..6aeec8d426c 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -268,7 +268,7 @@ static void load_plpgsql(FILE *cmdfd);
static void vacuum_db(FILE *cmdfd);
static void make_template0(FILE *cmdfd);
static void make_postgres(FILE *cmdfd);
-static void trapsig(int signum);
+static void trapsig(SIGNAL_ARGS);
static void check_ok(void);
static char *escape_quotes(const char *src);
static char *escape_quotes_bki(const char *src);
@@ -1848,10 +1848,10 @@ make_postgres(FILE *cmdfd)
* So this will need some testing on Windows.
*/
static void
-trapsig(int signum)
+trapsig(SIGNAL_ARGS)
{
/* handle systems that reset the handler, like Windows (grr) */
- pqsignal(signum, trapsig);
+ pqsignal(postgres_signal_arg, trapsig);
caught_signal = true;
}
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
index 37c14d1a029..5c22c914bc7 100644
--- a/src/bin/pg_basebackup/pg_receivewal.c
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -679,7 +679,7 @@ StreamLog(void)
#ifndef WIN32
static void
-sigexit_handler(int signum)
+sigexit_handler(SIGNAL_ARGS)
{
time_to_stop = true;
}
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
index a86739ec126..4392e23e888 100644
--- a/src/bin/pg_basebackup/pg_recvlogical.c
+++ b/src/bin/pg_basebackup/pg_recvlogical.c
@@ -654,7 +654,7 @@ error:
* possible moment.
*/
static void
-sigexit_handler(int signum)
+sigexit_handler(SIGNAL_ARGS)
{
time_to_abort = true;
}
@@ -663,7 +663,7 @@ sigexit_handler(int signum)
* Trigger the output file to be reopened.
*/
static void
-sighup_handler(int signum)
+sighup_handler(SIGNAL_ARGS)
{
output_reopen = true;
}
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index bba056f94fe..9291c61d000 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -850,7 +850,7 @@ read_post_opts(void)
* waiting for the server to start up, the server launch is aborted.
*/
static void
-trap_sigint_during_startup(int sig)
+trap_sigint_during_startup(SIGNAL_ARGS)
{
if (postmasterPID != -1)
{
@@ -863,8 +863,8 @@ trap_sigint_during_startup(int sig)
* Clear the signal handler, and send the signal again, to terminate the
* process as normal.
*/
- pqsignal(SIGINT, SIG_DFL);
- raise(SIGINT);
+ pqsignal(postgres_signal_arg, SIG_DFL);
+ raise(postgres_signal_arg);
}
static char *
diff --git a/src/bin/pg_test_fsync/pg_test_fsync.c b/src/bin/pg_test_fsync/pg_test_fsync.c
index 77f0db0376b..585b3ef7313 100644
--- a/src/bin/pg_test_fsync/pg_test_fsync.c
+++ b/src/bin/pg_test_fsync/pg_test_fsync.c
@@ -81,11 +81,11 @@ static void test_open_sync(const char *msg, int writes_size);
static void test_file_descriptor_sync(void);
#ifndef WIN32
-static void process_alarm(int sig);
+static void process_alarm(SIGNAL_ARGS);
#else
static DWORD WINAPI process_alarm(LPVOID param);
#endif
-static void signal_cleanup(int sig);
+static void signal_cleanup(SIGNAL_ARGS);
#ifdef HAVE_FSYNC_WRITETHROUGH
static int pg_fsync_writethrough(int fd);
@@ -590,14 +590,14 @@ test_non_sync(void)
}
static void
-signal_cleanup(int signum)
+signal_cleanup(SIGNAL_ARGS)
{
/* Delete the file if it exists. Ignore errors */
if (needs_unlink)
unlink(filename);
/* Finish incomplete line on stdout */
puts("");
- exit(signum);
+ exit(1);
}
#ifdef HAVE_FSYNC_WRITETHROUGH
@@ -632,7 +632,7 @@ print_elapse(struct timeval start_t, struct timeval stop_t, int ops)
#ifndef WIN32
static void
-process_alarm(int sig)
+process_alarm(SIGNAL_ARGS)
{
alarm_triggered = true;
}
diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
index 65281136280..9b792695629 100644
--- a/src/bin/pg_waldump/pg_waldump.c
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -80,7 +80,7 @@ typedef struct XLogDumpConfig
#ifndef WIN32
static void
-sigint_handler(int signum)
+sigint_handler(SIGNAL_ARGS)
{
time_to_stop = true;
}
diff --git a/src/include/port.h b/src/include/port.h
index cec41eae713..ce5da0534e8 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -472,7 +472,7 @@ extern int pg_check_dir(const char *dir);
extern int pg_mkdir_p(char *path, int omode);
/* port/pqsignal.c */
-typedef void (*pqsigfunc) (int signo);
+typedef void (*pqsigfunc) (SIGNAL_ARGS);
extern pqsigfunc pqsignal(int signo, pqsigfunc func);
/* port/quotes.c */
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 7290948eeee..dda076847a3 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -303,12 +303,12 @@ remove_temp(void)
* Signal handler that calls remove_temp() and reraises the signal.
*/
static void
-signal_remove_temp(int signum)
+signal_remove_temp(SIGNAL_ARGS)
{
remove_temp();
- pqsignal(signum, SIG_DFL);
- raise(signum);
+ pqsignal(postgres_signal_arg, SIG_DFL);
+ raise(postgres_signal_arg);
}
/*