Fix a race condition in getting the process exit code on Win32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77953 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-08-03 05:02:46 +00:00
parent 4bd03abe59
commit defc85327a
3 changed files with 31 additions and 8 deletions

View File

@ -29,6 +29,9 @@ namespace sys {
/// @since 1.4
/// @brief An abstraction for finding and executing programs.
class Program {
/// Opaque handle for target specific data.
void *Data;
unsigned Pid_;
// Noncopyable.
@ -39,9 +42,9 @@ namespace sys {
/// @{
public:
Program() : Pid_(0)
{}
Program();
~Program();
/// Return process ID of this program.
unsigned GetPid() { return Pid_; }