[commit: packages/process] master: GH77: Fix tests (86b273c)
git at git.haskell.org
git at git.haskell.org
Wed Jul 19 21:18:00 UTC 2017
Repository : ssh://git@git.haskell.org/process
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/86b273c670b78ed1913e9cc2b9a70641b0289f9c/process
>---------------------------------------------------------------
commit 86b273c670b78ed1913e9cc2b9a70641b0289f9c
Author: Tamar Christina <tamar at zhox.com>
Date: Sun Dec 4 18:45:26 2016 +0000
GH77: Fix tests
>---------------------------------------------------------------
86b273c670b78ed1913e9cc2b9a70641b0289f9c
System/Process/Internals.hs | 0
System/Process/Windows.hsc | 0
cbits/runProcess.c | 8 +++++---
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/cbits/runProcess.c b/cbits/runProcess.c
index b60bf07..6e6fcc1 100644
--- a/cbits/runProcess.c
+++ b/cbits/runProcess.c
@@ -671,6 +671,7 @@ runInteractiveProcess (wchar_t *cmd, wchar_t *workingDirectory,
// the thread suspended.
if (useJobObject)
{
+ printf("** NO CALL\n");
dwFlags |= CREATE_SUSPENDED;
*hJob = createJob();
if (!*hJob)
@@ -684,8 +685,9 @@ runInteractiveProcess (wchar_t *cmd, wchar_t *workingDirectory,
goto cleanup_err;
}
- if (hJob)
+ if (useJobObject && hJob)
{
+ printf("** NO CALL\n");
// Create the completion port and attach it to the job
*hIOcpPort = createCompletionPort (*hJob);
if (!*hIOcpPort)
@@ -724,8 +726,8 @@ cleanup_err:
if (hStdOutputWrite != INVALID_HANDLE_VALUE) CloseHandle(hStdOutputWrite);
if (hStdErrorRead != INVALID_HANDLE_VALUE) CloseHandle(hStdErrorRead);
if (hStdErrorWrite != INVALID_HANDLE_VALUE) CloseHandle(hStdErrorWrite);
- if (hJob ) CloseHandle(hJob);
- if (hIOcpPort ) CloseHandle(hIOcpPort);
+ if (useJobObject && hJob && *hJob ) CloseHandle(*hJob);
+ if (useJobObject && hIOcpPort && *hIOcpPort) CloseHandle(*hIOcpPort);
maperrno();
return NULL;
}
More information about the ghc-commits
mailing list