summaryrefslogtreecommitdiffstats
path: root/common/exechelp-w32.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/exechelp-w32.c')
-rw-r--r--common/exechelp-w32.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c
index e79ee5b14..2c44e2c75 100644
--- a/common/exechelp-w32.c
+++ b/common/exechelp-w32.c
@@ -309,6 +309,7 @@ create_pipe_and_estream (int filedes[2], int flags,
{
gpg_error_t err = 0;
HANDLE fds[2];
+ es_syshd_t syshd;
filedes[0] = filedes[1] = -1;
err = my_error (GPG_ERR_GENERAL);
@@ -337,10 +338,17 @@ create_pipe_and_estream (int filedes[2], int flags,
if (! err && r_fp)
{
+ syshd.type = ES_SYSHD_HANDLE;
if (!outbound)
- *r_fp = es_fdopen (filedes[0], nonblock? "r,nonblock" : "r");
+ {
+ syshd.u.handle = fds[0];
+ *r_fp = es_sysopen (&syshd, nonblock? "r,nonblock" : "r");
+ }
else
- *r_fp = es_fdopen (filedes[1], nonblock? "w,nonblock" : "w");
+ {
+ syshd.u.handle = fds[1];
+ *r_fp = es_sysopen (&syshd, nonblock? "w,nonblock" : "w");
+ }
if (!*r_fp)
{
err = my_error_from_syserror ();