aboutsummaryrefslogtreecommitdiff
path: root/src/include/miscadmin.h
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2018-09-27 07:47:20 +0900
committerMichael Paquier <michael@paquier.xyz>2018-09-27 07:47:20 +0900
commitba16aade337b16028d1e9e156d83417097c13817 (patch)
tree861992d97ab2fd0b8212ecf95837730abcc4e0ce /src/include/miscadmin.h
parent751f532b9766fb5d3c334758abea95b7bb085c5a (diff)
downloadpostgresql-ba16aade337b16028d1e9e156d83417097c13817.tar.gz
postgresql-ba16aade337b16028d1e9e156d83417097c13817.zip
Switch flags tracking pending interrupts to sig_atomic_t
Those previously used bool, which should be safe on any modern platforms, however the C standard is clear that it is better to use sig_atomic_t for variables manipulated in signal handlers. This commit adds at the same time PGDLLIMPORT to ClientConnectionLost. Author: Michael Paquier Reviewed-by: Tom Lane, Chris Travers, Andres Freund Discussion: https://postgr.es/m/20180925011311.GD1354@paquier.xyz
Diffstat (limited to 'src/include/miscadmin.h')
-rw-r--r--src/include/miscadmin.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index e167ee8fcbe..69f356f8cdb 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -77,13 +77,13 @@
/* in globals.c */
/* these are marked volatile because they are set by signal handlers: */
-extern PGDLLIMPORT volatile bool InterruptPending;
-extern PGDLLIMPORT volatile bool QueryCancelPending;
-extern PGDLLIMPORT volatile bool ProcDiePending;
-extern PGDLLIMPORT volatile bool IdleInTransactionSessionTimeoutPending;
+extern PGDLLIMPORT volatile sig_atomic_t InterruptPending;
+extern PGDLLIMPORT volatile sig_atomic_t QueryCancelPending;
+extern PGDLLIMPORT volatile sig_atomic_t ProcDiePending;
+extern PGDLLIMPORT volatile sig_atomic_t IdleInTransactionSessionTimeoutPending;
extern PGDLLIMPORT volatile sig_atomic_t ConfigReloadPending;
-extern volatile bool ClientConnectionLost;
+extern PGDLLIMPORT volatile sig_atomic_t ClientConnectionLost;
/* these are marked volatile because they are examined by signal handlers: */
extern PGDLLIMPORT volatile uint32 InterruptHoldoffCount;