Unverified Commit 43f95b16 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Properly close child handles in winproc device

When spawning a child with pipes we have to close all
the Handles we inherited otherwise the Pipe will not
close by itself. This semi worked for Write Only
because we closed the inhertied end of the pipe
instead of our own side..

This was the real reason for:
GnuPG-Bug-Id: T6139
parent 8a295dd6
Pipeline #225359 passed with stage
in 2 minutes and 19 seconds
......@@ -428,6 +428,9 @@ bool WindowsProcessDevice::Private::start(QIODevice::OpenMode mode)
&piProcInfo); // receives PROCESS_INFORMATION
HeapFree(GetProcessHeap(), 0, attributeList);
CloseHandleX (mStdOutWr);
CloseHandleX (mStdErrWr);
CloseHandleX (mStdInRd);
if (!suc) {
......@@ -438,9 +441,8 @@ bool WindowsProcessDevice::Private::start(QIODevice::OpenMode mode)
mProc = piProcInfo.hProcess;
mThread = piProcInfo.hThread;
if (mode == QIODevice::WriteOnly) {
CloseHandleX (mStdInRd);
CloseHandleX (mStdOutRd);
if (mode == QIODevice::ReadOnly) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment