From e8ee5c4c4069c159baabaa4071f066a7453e44c2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 21 Jan 2012 22:37:52 +0000 Subject: [PATCH] -LRN: W32-pipes-are-overlapped-by-default-now --- src/util/disk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/util/disk.c b/src/util/disk.c index 1454a71b1..7ce4f5808 100644 --- a/src/util/disk.c +++ b/src/util/disk.c @@ -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); -- 2.25.1