diff options
Diffstat (limited to 'contrib/llvm/lib/Support/Windows/Program.inc')
-rw-r--r-- | contrib/llvm/lib/Support/Windows/Program.inc | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/contrib/llvm/lib/Support/Windows/Program.inc b/contrib/llvm/lib/Support/Windows/Program.inc index 80ccaa6..691d6d4 100644 --- a/contrib/llvm/lib/Support/Windows/Program.inc +++ b/contrib/llvm/lib/Support/Windows/Program.inc @@ -13,9 +13,9 @@ #include "Windows.h" #include <cstdio> -#include <malloc.h> -#include <io.h> #include <fcntl.h> +#include <io.h> +#include <malloc.h> //===----------------------------------------------------------------------===// //=== WARNING: Implementation here must contain only Win32 specific code @@ -43,11 +43,6 @@ Program::~Program() { } } -unsigned Program::GetPid() const { - Win32ProcessInfo* wpi = reinterpret_cast<Win32ProcessInfo*>(Data_); - return wpi->dwProcessId; -} - // This function just uses the PATH environment variable to find the program. Path Program::FindProgramByName(const std::string& progName) { @@ -380,23 +375,6 @@ Program::Wait(const Path &path, return 1; } -bool -Program::Kill(std::string* ErrMsg) { - if (Data_ == 0) { - MakeErrMsg(ErrMsg, "Process not started!"); - return true; - } - - Win32ProcessInfo* wpi = reinterpret_cast<Win32ProcessInfo*>(Data_); - HANDLE hProcess = wpi->hProcess; - if (TerminateProcess(hProcess, 1) == 0) { - MakeErrMsg(ErrMsg, "The process couldn't be killed!"); - return true; - } - - return false; -} - error_code Program::ChangeStdinToBinary(){ int result = _setmode( _fileno(stdin), _O_BINARY ); if (result == -1) |