diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-09-14 14:44:45 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-09-14 14:44:50 -0400 |
commit | b66fbd8afe6eb80e3e48495e002fda9aa92df583 (patch) | |
tree | 801155b20dee3af5b19d44c0f735ab5e1e7de132 /src/bin/pg_test_fsync | |
parent | ab393528fa4b2486237ee7aa51fac67f82fee824 (diff) | |
download | postgresql-b66fbd8afe6eb80e3e48495e002fda9aa92df583.tar.gz postgresql-b66fbd8afe6eb80e3e48495e002fda9aa92df583.zip |
Use SIGNAL_ARGS consistently to declare signal handlers.
Various bits of code were declaring signal handlers manually,
using "int signum" or variants of that. We evidently have no
platforms where that's actually wrong, but let's use our
SIGNAL_ARGS macro everywhere anyway. If nothing else, it's
good for finding signal handlers easily.
No need for back-patch, since this is just cosmetic AFAICS.
Discussion: https://postgr.es/m/2684964.1663167995@sss.pgh.pa.us
Diffstat (limited to 'src/bin/pg_test_fsync')
-rw-r--r-- | src/bin/pg_test_fsync/pg_test_fsync.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |