aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-glib-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32-glib-io.c')
-rw-r--r--src/w32-glib-io.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/w32-glib-io.c b/src/w32-glib-io.c
index c1542cc0..17d60fc0 100644
--- a/src/w32-glib-io.c
+++ b/src/w32-glib-io.c
@@ -777,8 +777,11 @@ _gpgme_io_spawn (const char *path, char * const argv[], unsigned int flags,
TRACE_LOG1 ("CloseHandle of process failed: ec=%d",
(int) GetLastError ());
- for (i = 0; fd_list[i].fd != -1; i++)
- _gpgme_io_close (fd_list[i].fd);
+ if (! (flags & IOSPAWN_FLAG_NOCLOSE))
+ {
+ for (i = 0; fd_list[i].fd != -1; i++)
+ _gpgme_io_close (fd_list[i].fd);
+ }
for (i = 0; fd_list[i].fd != -1; i++)
if (fd_list[i].dup_to == -1)