gmain: Access Unix signal handler state atomically
There are two variables which are used to pass state from the Unix
signal handler interrupt function to the rest of gmain.c
. They are
currently defined as sig_atomic_t
, which means that they are
guaranteed to be interrupt safe. However, it does not guarantee they are
thread-safe, and GLib attaches its signal handler interrupt function to
a worker thread.
Make them thread-safe using atomics.
Signed-off-by: Philip Withnall withnall@endlessm.com
Fixes: #1670 (closed)