[wing/wip/clientoverlapped] named-pipe: pass overlapped and shared flags to CreateFile



commit eb78c55163ba2aa93467a75e56f79934dc455daf
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Tue Sep 13 17:19:43 2016 +0200

    named-pipe: pass overlapped and shared flags to CreateFile
    
    The docs say that we need at least the Overlapped flag so
    write and read can be shared.

 wing/wingnamedpipeclient.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/wing/wingnamedpipeclient.c b/wing/wingnamedpipeclient.c
index d013333..a749747 100644
--- a/wing/wingnamedpipeclient.c
+++ b/wing/wingnamedpipeclient.c
@@ -186,10 +186,10 @@ wing_named_pipe_client_connect (WingNamedPipeClient  *client,
     {
       handle = CreateFileW (pipe_namew,
                             GENERIC_READ | GENERIC_WRITE,
-                            0,
+                            FILE_SHARE_READ | FILE_SHARE_WRITE,
                             NULL,
                             OPEN_EXISTING,
-                            0,
+                            FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
                             NULL);
 
       if (g_cancellable_set_error_if_cancelled (cancellable, error))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]