Commit 5393ba97 authored by Joerg Bornemann's avatar Joerg Bornemann
Browse files

Remove handle duplication code from QWindowsPipeWriter


There is no apparent reason why the handle should be duplicated.

Change-Id: I8ff2cde2f050934ed0dd9ab2d39a1b1efa327a17
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
parent 6c53f252
No related merge requests found
Showing with 1 addition and 4 deletions
...@@ -39,12 +39,10 @@ QT_BEGIN_NAMESPACE ...@@ -39,12 +39,10 @@ QT_BEGIN_NAMESPACE
QWindowsPipeWriter::QWindowsPipeWriter(HANDLE pipe, QObject * parent) QWindowsPipeWriter::QWindowsPipeWriter(HANDLE pipe, QObject * parent)
: QThread(parent), : QThread(parent),
writePipe(INVALID_HANDLE_VALUE), writePipe(pipe),
quitNow(false), quitNow(false),
hasWritten(false) hasWritten(false)
{ {
DuplicateHandle(GetCurrentProcess(), pipe, GetCurrentProcess(),
&writePipe, 0, FALSE, DUPLICATE_SAME_ACCESS);
} }
QWindowsPipeWriter::~QWindowsPipeWriter() QWindowsPipeWriter::~QWindowsPipeWriter()
...@@ -55,7 +53,6 @@ QWindowsPipeWriter::~QWindowsPipeWriter() ...@@ -55,7 +53,6 @@ QWindowsPipeWriter::~QWindowsPipeWriter()
lock.unlock(); lock.unlock();
if (!wait(30000)) if (!wait(30000))
terminate(); terminate();
CloseHandle(writePipe);
} }
bool QWindowsPipeWriter::waitForWrite(int msecs) bool QWindowsPipeWriter::waitForWrite(int msecs)
......
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