mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user