diff options
author | Maria Matejka <mq@ucw.cz> | 2019-10-04 12:20:02 +0200 |
---|---|---|
committer | Maria Matejka <mq@jmq.cz> | 2019-10-04 20:52:07 +0200 |
commit | 24493e9169d3058958ab3ec4d2b02c5753954981 (patch) | |
tree | c50c972dc4b0362ca77d9887ddc93a3372036653 /test/birdtest.c | |
parent | 4821251ebb13c05e8752f6f54b8e5ad6d87fecaa (diff) |
Fixed undefined behavior on signals.
The C11 specification allows only sig_atomic_t and _Atomic variable
access. All other accesses to global variables are undefined behavior.
Using int was probably OK on x86 and x86_64; yet there were some reports
from other architectures (especially some MIPS) that in rare cases,
after issuing SIGHUP, BIRD did strange things.
Diffstat (limited to 'test/birdtest.c')
-rw-r--r-- | test/birdtest.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/birdtest.c b/test/birdtest.c index c0d4bd05..484205d2 100644 --- a/test/birdtest.c +++ b/test/birdtest.c @@ -36,6 +36,11 @@ static int no_fork; static int no_timeout; static int is_terminal; /* Whether stdout is a live terminal or pipe redirect */ +volatile sig_atomic_t async_config_flag; /* Asynchronous reconfiguration/dump scheduled */ +volatile sig_atomic_t async_dump_flag; +volatile sig_atomic_t async_shutdown_flag; + + uint bt_verbose; const char *bt_filename; const char *bt_test_id; |