[Support] Fix handle and memory leak for processes that are not waited for
authorReid Kleckner <reid@kleckner.net>
Thu, 13 Jun 2013 15:27:17 +0000 (15:27 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 13 Jun 2013 15:27:17 +0000 (15:27 +0000)
commit62d124a1fa8b212bae1d331f027c9eec06a45199
treed54ab55c93830ef075514d681167fd86d9fd81e9
parent0db5f0f07e6411fa25aefd464648ec8fc335a2d7
[Support] Fix handle and memory leak for processes that are not waited for

Execute's Data parameter is now optional, so we won't allocate memory
for it on Windows and we'll close the process handle.

The Unix code should probably do something similar to avoid accumulation
of zombie children that haven't been waited on.

Tested on Linux and Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183906 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Program.cpp
lib/Support/Unix/Program.inc
lib/Support/Windows/Program.inc