diff options
Diffstat (limited to 'lib/Support/Unix/Program.inc')
-rw-r--r-- | lib/Support/Unix/Program.inc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/Support/Unix/Program.inc b/lib/Support/Unix/Program.inc index 9c34f2ba1a..13626d1106 100644 --- a/lib/Support/Unix/Program.inc +++ b/lib/Support/Unix/Program.inc @@ -47,11 +47,6 @@ Program::Program() : Data_(0) {} Program::~Program() {} -unsigned Program::GetPid() const { - uint64_t pid = reinterpret_cast<uint64_t>(Data_); - return static_cast<unsigned>(pid); -} - // This function just uses the PATH environment variable to find the program. Path Program::FindProgramByName(const std::string& progName) { @@ -407,25 +402,7 @@ Program::Wait(const sys::Path &path, MakeErrMsg(ErrMsg, "PNACL does not know how to wait for a child process!"); return -1; #endif // (__native_client__) -} - -bool -Program::Kill(std::string* ErrMsg) { #if !defined(__native_client__) - if (Data_ == 0) { - MakeErrMsg(ErrMsg, "Process not started!"); - return true; - } - - uint64_t pid64 = reinterpret_cast<uint64_t>(Data_); - pid_t pid = static_cast<pid_t>(pid64); - - if (kill(pid, SIGKILL) != 0) { - MakeErrMsg(ErrMsg, "The process couldn't be killed!"); - return true; - } - - return false; #else // (__native_client__) MakeErrMsg(ErrMsg, "PNACL does not know how to kill processes!"); |