diff options
Diffstat (limited to 'lib/System/Unix/Program.inc')
-rw-r--r-- | lib/System/Unix/Program.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index fca9292382..fdd0c25fd1 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -283,6 +283,16 @@ Program::Wait(unsigned secondsToWait, } +bool +Program::Kill(std::string* ErrMsg) { + if (Pid_ == 0) { + MakeErrMsg(ErrMsg, "Process not started!"); + return true; + } + + return (kill(Pid_, SIGKILL) == 0); +} + bool Program::ChangeStdinToBinary(){ // Do nothing, as Unix doesn't differentiate between text and binary. return false; |