7.14p2 sig_atomic_t which is the (possibly volatile-qualified)
integer type of an object that can be accessed as an atomic
entity, even in the presence of asynchronous interrupts.
126.96.36.199p5 behavior is undefined if the signal handler refers to
any object with static storage duration other than by assigning
a value to an object declared as volatile sig_atomic_t,
Is there a real possibility that a read in a signal handler could break
something? I can think of one such scenario, but it violates 7.14p2:
There are no machine instructions for atomic sig_atomic_t access. If
the access is interrupted, it is restarted or canceled as appropriate
when the signal handler returns. Thus, the signal handler could see
a partially written value, but the interrupted function could not.
Implementing it would be pretty yucky, too:-)
Because signal handlers suck, and it was hard enough getting
consensus on adding "setting a flag variable" to the small
list of things that a s.c. program is allowed to do within
a signal handler.