-LRN: W32-pipes-are-overlapped-by-default-now
[oweals/gnunet.git] / src / util / disk.c
index 1454a71b190a464f77b7e1901d48ecd10cc0374c..7ce4f580877522e3d85cc90cea6b190fabba4228 100644 (file)
@@ -2181,10 +2181,13 @@ GNUNET_DISK_pipe (int blocking_read, int blocking_write, int inherit_read, int i
   BOOL ret;
   HANDLE tmp_handle;
 
+  /* All pipes are overlapped. If you want them to block - just
+   * call WriteFile() and ReadFile() with NULL overlapped pointer.
+   */
   ret =
       create_selectable_pipe (&p->fd[0]->h, &p->fd[1]->h, NULL, 0,
-                              blocking_read ? 0 : FILE_FLAG_OVERLAPPED,
-                              blocking_write ? 0 : FILE_FLAG_OVERLAPPED);
+                              FILE_FLAG_OVERLAPPED,
+                              FILE_FLAG_OVERLAPPED);
   if (!ret)
   {
     GNUNET_free (p);