diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp
index 21df5d064349e1cc23bfb7f38f20fc5d1720bee6..5b11ba6112aa2756424290bc47a2fc838b472ec3 100644
--- a/src/corelib/io/qwindowspipewriter.cpp
+++ b/src/corelib/io/qwindowspipewriter.cpp
@@ -39,12 +39,10 @@ QT_BEGIN_NAMESPACE
 
 QWindowsPipeWriter::QWindowsPipeWriter(HANDLE pipe, QObject * parent)
     : QThread(parent),
-      writePipe(INVALID_HANDLE_VALUE),
+      writePipe(pipe),
       quitNow(false),
       hasWritten(false)
 {
-    DuplicateHandle(GetCurrentProcess(), pipe, GetCurrentProcess(),
-                         &writePipe, 0, FALSE, DUPLICATE_SAME_ACCESS);
 }
 
 QWindowsPipeWriter::~QWindowsPipeWriter()
@@ -55,7 +53,6 @@ QWindowsPipeWriter::~QWindowsPipeWriter()
     lock.unlock();
     if (!wait(30000))
         terminate();
-    CloseHandle(writePipe);
 }
 
 bool QWindowsPipeWriter::waitForWrite(int msecs)