summaryrefslogtreecommitdiff
path: root/lib/System/Win32/Program.inc
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2009-09-09 09:51:47 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2009-09-09 09:51:47 +0000
commit8add26934ae8293414e13e648bb599ad3acfee17 (patch)
treec7c4c0623c578cb992fbb46e1ebe2f8d14ab0900 /lib/System/Win32/Program.inc
parent6e89b6f107b18c2b6aeea430237a3af509d8263a (diff)
downloadllvm-8add26934ae8293414e13e648bb599ad3acfee17.tar.gz
llvm-8add26934ae8293414e13e648bb599ad3acfee17.tar.bz2
llvm-8add26934ae8293414e13e648bb599ad3acfee17.tar.xz
Check that the 'kill' call succeeded.
Thanks to Duncan Sands for spotting this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32/Program.inc')
-rw-r--r--lib/System/Win32/Program.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/System/Win32/Program.inc b/lib/System/Win32/Program.inc
index 87f9e64e4c..af6cce6de1 100644
--- a/lib/System/Win32/Program.inc
+++ b/lib/System/Win32/Program.inc
@@ -347,7 +347,12 @@ Program::Kill(std::string* ErrMsg) {
}
HANDLE hProcess = reinterpret_cast<HANDLE>(Data_);
- return TerminateProcess(hProcess, 1);
+ if (TerminateProcess(hProcess, 1) == 0) {
+ MakeErrMsg(ErrMsg, "The process couldn't be killed!");
+ return true;
+ }
+
+ return false;
}
bool Program::ChangeStdinToBinary(){