File pacemaker-cib-mark-variable-as-volatile.patch of Package pacemaker.14737
commit 06aac7597492ac33d155911d36afa345f701fc91
Author: Ken Gaillot <kgaillot@redhat.com>
Date: Fri Feb 17 11:34:17 2017 -0600
Fix: cib: properly mark variable as volatile
Index: pacemaker/cib/cibio.h
===================================================================
--- pacemaker.orig/cib/cibio.h
+++ pacemaker/cib/cibio.h
@@ -43,7 +43,7 @@ extern xmlNode *readCibXmlFile(const cha
extern int activateCibBuffer(char *buffer, const char *filename);
extern int activateCibXml(xmlNode * doc, gboolean to_disk, const char *op);
extern crm_trigger_t *cib_writer;
-extern gboolean cib_writes_enabled;
+extern volatile gboolean cib_writes_enabled;
/* extern xmlNode *server_get_cib_copy(void); */
Index: pacemaker/cib/main.c
===================================================================
--- pacemaker.orig/cib/main.c
+++ pacemaker/cib/main.c
@@ -75,7 +75,10 @@ GMainLoop *mainloop = NULL;
const char *cib_root = NULL;
char *cib_our_uname = NULL;
gboolean preserve_status = FALSE;
-gboolean cib_writes_enabled = TRUE;
+
+/* volatile because it may be changed in a signal handler */
+volatile gboolean cib_writes_enabled = TRUE;
+
int remote_fd = 0;
int remote_tls_fd = 0;