Fix the SIGINT handlers

Description

Fix the SIGINT handlers

  1. Fix a data race (g_interrupt_sent flag usage was not thread safe, signals

can be handled on arbitrary threads)

  1. exit() is not signal-safe, replaced it with the signal-safe equivalent

_exit()

(This differs from the patch on Phabrictor because I had to add
#include <atomic> to get the definition of std::atomic_flag.)

patch by lemo

Differential Revision: https://reviews.llvm.org/D37926

Details

Committed
amccarthSep 20 2017, 11:09 AM
Differential Revision
D37926: Fix the SIGINT handlers
Parents
rL313784: Remove offset size check in nullptr arithmetic handling
Branches
Unknown
Tags
Unknown