Jacek Caban : kernel32: Wait on pipe handle in ConnectNamedPipe if needed.

Alexandre Julliard julliard at winehq.org
Tue Oct 30 14:19:35 CDT 2018


Module: wine
Branch: master
Commit: b114bd07b1edb29b47251edf0b7ce136d455a8cc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b114bd07b1edb29b47251edf0b7ce136d455a8cc

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Oct 30 16:08:22 2018 +0100

kernel32: Wait on pipe handle in ConnectNamedPipe if needed.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/sync.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c
index fe70565..f3bd962 100644
--- a/dlls/kernel32/sync.c
+++ b/dlls/kernel32/sync.c
@@ -1681,6 +1681,11 @@ BOOL WINAPI ConnectNamedPipe(HANDLE hPipe, LPOVERLAPPED overlapped)
     status = NtFsControlFile(hPipe, overlapped ? overlapped->hEvent : NULL, NULL, cvalue,
                              overlapped ? (IO_STATUS_BLOCK *)overlapped : &status_block,
                              FSCTL_PIPE_LISTEN, NULL, 0, NULL, 0);
+    if (status == STATUS_PENDING && !overlapped)
+    {
+        WaitForSingleObject(hPipe, INFINITE);
+        status = status_block.u.Status;
+    }
 
     if (status == STATUS_SUCCESS) return TRUE;
     SetLastError( RtlNtStatusToDosError(status) );




More information about the wine-cvs mailing list