 
                            ...
| Code Block | ||||
|---|---|---|---|---|
| 
 | ||||
| #include <signal.h>
sig_atomic_t interrupted;   /* Bug: not declared volatile */
void sigint_handler(int signum) {
  interrupted = 1;   /* Assignment may not be visible in main(). */
}
int main(void) {
  signal(SIGINT, sigint_handler);
  while (!interrupted) {   /* Loop may never terminate. */
   /* Do something */
  }
  return 0;
}
 | 
...