summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
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
commitd2f8a111cd06ad99092e3f8b453fe69495f6563e (patch)
treea43f5843aead057bc3713f463cd3007519b5c813 /llvm/lib/System/Unix
parenta40184aa7749dc10ab8af4fade6e8947239bb4c9 (diff)
downloadbcm5719-llvm-d2f8a111cd06ad99092e3f8b453fe69495f6563e.tar.gz
bcm5719-llvm-d2f8a111cd06ad99092e3f8b453fe69495f6563e.zip
Check that the 'kill' call succeeded.
Thanks to Duncan Sands for spotting this. llvm-svn: 81328
Diffstat (limited to 'llvm/lib/System/Unix')
-rw-r--r--llvm/lib/System/Unix/Program.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc
index 1ffd71af10d..56dea250a77 100644
--- a/llvm/lib/System/Unix/Program.inc
+++ b/llvm/lib/System/Unix/Program.inc
@@ -298,7 +298,13 @@ Program::Kill(std::string* ErrMsg) {
uint64_t pid64 = reinterpret_cast<uint64_t>(Data_);
pid_t pid = static_cast<pid_t>(pid64);
- return (kill(pid, SIGKILL) == 0);
+
+ if (kill(pid, SIGKILL) != 0) {
+ MakeErrMsg(ErrMsg, "The process couldn't be killed!");
+ return true;
+ }
+
+ return false;
}
bool Program::ChangeStdinToBinary(){
OpenPOWER on IntegriCloud