diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2014-04-16 08:08:42 (GMT) |
---|---|---|
committer | Nicolas Despres <nicolas.despres@gmail.com> | 2015-04-24 15:42:59 (GMT) |
commit | 9fff9551b2f3d3e5c994512b06832b40560d510b (patch) | |
tree | 013a6eda9af77438bce692df0e88ebb426cf19e9 /src/subprocess.h | |
parent | b4bc5cf7c924be251a5c8abdfca58f47c3f5c185 (diff) | |
download | Ninja-9fff9551b2f3d3e5c994512b06832b40560d510b.zip Ninja-9fff9551b2f3d3e5c994512b06832b40560d510b.tar.gz Ninja-9fff9551b2f3d3e5c994512b06832b40560d510b.tar.bz2 |
Forward interruption signal to child processes.
Diffstat (limited to 'src/subprocess.h')
-rw-r--r-- | src/subprocess.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/subprocess.h b/src/subprocess.h index daeeef6..a001fc9 100644 --- a/src/subprocess.h +++ b/src/subprocess.h @@ -89,7 +89,12 @@ struct SubprocessSet { static HANDLE ioport_; #else static void SetInterruptedFlag(int signum); - static bool interrupted_; + static void HandlePendingInterruption(); + /// Store the signal number that causes the interruption. + /// 0 if not interruption. + static int interrupted_; + + static bool IsInterrupted() { return interrupted_ != 0; } struct sigaction old_int_act_; struct sigaction old_term_act_; |