diff options
Diffstat (limited to 'gpgme/w32-io.c')
-rw-r--r-- | gpgme/w32-io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gpgme/w32-io.c b/gpgme/w32-io.c index c4d2a1bf..e7dad2c3 100644 --- a/gpgme/w32-io.c +++ b/gpgme/w32-io.c @@ -1007,7 +1007,7 @@ build_commandline (char **argv) int _gpgme_io_spawn (const char *path, char **argv, struct spawn_fd_item_s *fd_child_list, - struct spawn_fd_item_s *fd_parent_list) + struct spawn_fd_item_s *fd_parent_list, pid_t *r_pid) { SECURITY_ATTRIBUTES sec_attr; PROCESS_INFORMATION pi = @@ -1015,7 +1015,7 @@ _gpgme_io_spawn (const char *path, char **argv, NULL, /* returns process handle */ 0, /* returns primary thread handle */ 0, /* returns pid */ - 0 /* returns tid */ + 0 /* returns tid */ }; STARTUPINFO si; char *envblock = NULL; @@ -1147,6 +1147,8 @@ _gpgme_io_spawn (const char *path, char **argv, "dwProcessID=%d, dwThreadId=%d", pi.hProcess, pi.hThread, (int) pi.dwProcessId, (int) pi.dwThreadId); + if (r_pid) + *r_pid = (pid_t)pi.dwProcessId; if (ResumeThread (pi.hThread) < 0) TRACE_LOG1 ("ResumeThread failed: ec=%d", (int) GetLastError ()); |