diff options
Diffstat (limited to '')
-rw-r--r-- | tools/gpgtar-extract.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c index 87113b054..e93ffdc37 100644 --- a/tools/gpgtar-extract.c +++ b/tools/gpgtar-extract.c @@ -390,6 +390,7 @@ gpgtar_extract (const char *filename, int decrypt) int except[2] = { -1, -1 }; #endif const char **argv; + gnupg_spawn_actions_t act = NULL; ccparray_init (&ccp, 0); if (opt.batch) @@ -435,10 +436,22 @@ gpgtar_extract (const char *filename, int decrypt) goto leave; } + err = gnupg_spawn_actions_new (&act); + if (err) + { + xfree (argv); + goto leave; + } + +#ifdef HAVE_W32_SYSTEM + gnupg_spawn_actions_set_inherit_handles (act, except); +#else + gnupg_spawn_actions_set_inherit_fds (act, except); +#endif err = gnupg_process_spawn (opt.gpg_program, argv, ((filename ? 0 : GNUPG_PROCESS_STDIN_KEEP) - | GNUPG_PROCESS_STDOUT_PIPE), - gnupg_spawn_helper, except, &proc); + | GNUPG_PROCESS_STDOUT_PIPE), act, &proc); + gnupg_spawn_actions_release (act); xfree (argv); if (err) goto leave; |