diff options
| author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-09-08 19:50:27 +0000 |
|---|---|---|
| committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-09-08 19:50:27 +0000 |
| commit | a28016831340436a42b077c2711e040c46cb106f (patch) | |
| tree | 7638e037b222302c93a3706c4c1d790a02bccacc /include/llvm/System | |
| parent | 83d45d7286b38453c8182486393dabde6f28c574 (diff) | |
| download | external_llvm-a28016831340436a42b077c2711e040c46cb106f.zip external_llvm-a28016831340436a42b077c2711e040c46cb106f.tar.gz external_llvm-a28016831340436a42b077c2711e040c46cb106f.tar.bz2 | |
Add a Kill() function to the Program class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
| -rw-r--r-- | include/llvm/System/Program.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/llvm/System/Program.h b/include/llvm/System/Program.h index 7f96245..ae37ece 100644 --- a/include/llvm/System/Program.h +++ b/include/llvm/System/Program.h @@ -30,7 +30,7 @@ namespace sys { /// @brief An abstraction for finding and executing programs. class Program { /// Opaque handle for target specific data. - void *Data; + void *Data; unsigned Pid_; @@ -43,8 +43,8 @@ namespace sys { public: Program(); - ~Program(); - + ~Program(); + /// Return process ID of this program. unsigned GetPid() { return Pid_; } @@ -103,6 +103,17 @@ namespace sys { ///< program. ); + /// This function terminates the program. + /// @returns true if an error occured. + /// @see Execute + /// @brief Terminates the program. + bool Kill + ( std::string* ErrMsg = 0 ///< If non-zero, provides a pointer to a string + ///< instance in which error messages will be returned. If the string + ///< is non-empty upon return an error occurred while invoking the + ///< program. + ); + /// This static constructor (factory) will attempt to locate a program in /// the operating system's file system using some pre-determined set of /// locations to search (e.g. the PATH on Unix). |
