Skip to content

Commit 1e31484

Browse files
committed
Mark two signal flags as sig_atomic_t in pgbench and pg_test_fsync
Two booleans used for timeout tracking were used within some SIGALRM signal handlers, but they were not declared as sig_atomic_t, so mark them as such. This has no consequence on WIN32 for both tools. Author: Ranier Vilela Reviewed-by: Michael Paquier, Masahiko Sawada Discussion: https://postgr.es/m/CAEudQArCDQQiPiFR16=yu9k5s2tp4tgEe1U1ZbkW4ofx81AWWQ@mail.gmail.com
1 parent 02ac05b commit 1e31484

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bin/pg_test_fsync/pg_test_fsync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static char full_buf[DEFAULT_XLOG_SEG_SIZE],
6868
*filename = FSYNC_FILENAME;
6969
static struct timeval start_t,
7070
stop_t;
71-
static bool alarm_triggered = false;
71+
static sig_atomic_t alarm_triggered = false;
7272

7373

7474
static void handle_args(int argc, char *argv[]);

src/bin/pgbench/pgbench.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ const char *progname;
310310

311311
#define WSEP '@' /* weight separator */
312312

313-
volatile bool timer_exceeded = false; /* flag from signal handler */
313+
volatile sig_atomic_t timer_exceeded = false; /* flag from signal handler */
314314

315315
/*
316316
* We don't want to allocate variables one by one; for efficiency, add a

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy