aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Fuzzer/FuzzerUtil.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-03-24 21:03:58 +0000
committerKostya Serebryany <kcc@google.com>2016-03-24 21:03:58 +0000
commitf389ae12c1c8e2085ca9679ff09d253b5ac52f66 (patch)
tree8f41fad9ea3d2c0802d3a251af27bf7e287b28a7 /llvm/lib/Fuzzer/FuzzerUtil.cpp
parent6bcfe318208532a9655c349f27a4e9b20972594f (diff)
downloadllvm-f389ae12c1c8e2085ca9679ff09d253b5ac52f66.zip
llvm-f389ae12c1c8e2085ca9679ff09d253b5ac52f66.tar.gz
llvm-f389ae12c1c8e2085ca9679ff09d253b5ac52f66.tar.bz2
[libFuzzer] handle SIGTERM
llvm-svn: 264338
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerUtil.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerUtil.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerUtil.cpp b/llvm/lib/Fuzzer/FuzzerUtil.cpp
index 84c4983..d533561 100644
--- a/llvm/lib/Fuzzer/FuzzerUtil.cpp
+++ b/llvm/lib/Fuzzer/FuzzerUtil.cpp
@@ -106,6 +106,7 @@ void SetSigAbrtHandler() { SetSigaction(SIGABRT, CrashHandler); }
void SetSigIllHandler() { SetSigaction(SIGILL, CrashHandler); }
void SetSigFpeHandler() { SetSigaction(SIGFPE, CrashHandler); }
void SetSigIntHandler() { SetSigaction(SIGINT, InterruptHandler); }
+void SetSigTermHandler() { SetSigaction(SIGTERM, InterruptHandler); }
int NumberOfCpuCores() {
FILE *F = popen("nproc", "r");