diff options
Diffstat (limited to 'tools/gpgtar-list.c')
-rw-r--r-- | tools/gpgtar-list.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/gpgtar-list.c b/tools/gpgtar-list.c index 0c5e474f3..55d9246af 100644 --- a/tools/gpgtar-list.c +++ b/tools/gpgtar-list.c @@ -474,6 +474,7 @@ gpgtar_list (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) @@ -513,10 +514,22 @@ gpgtar_list (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; |