diff options
Diffstat (limited to 'src/w32-io.c')
-rw-r--r-- | src/w32-io.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/w32-io.c b/src/w32-io.c index f87db121..e83aa0b9 100644 --- a/src/w32-io.c +++ b/src/w32-io.c @@ -1234,8 +1234,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) |