diff options
Diffstat (limited to 'tools/gpgtar-create.c')
-rw-r--r-- | tools/gpgtar-create.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gpgtar-create.c b/tools/gpgtar-create.c index e642da0b9..10906584c 100644 --- a/tools/gpgtar-create.c +++ b/tools/gpgtar-create.c @@ -1151,6 +1151,7 @@ gpgtar_create (char **inpattern, const char *files_from, int null_names, { strlist_t arg; ccparray_t ccp; + int except[2] = { -1, -1 }; const char **argv; /* '--encrypt' may be combined with '--symmetric', but 'encrypt' @@ -1174,6 +1175,7 @@ gpgtar_create (char **inpattern, const char *files_from, int null_names, snprintf (tmpbuf, sizeof tmpbuf, "--status-fd=%d", opt.status_fd); ccparray_put (&ccp, tmpbuf); + except[0] = opt.status_fd; } ccparray_put (&ccp, "--output"); @@ -1205,7 +1207,9 @@ gpgtar_create (char **inpattern, const char *files_from, int null_names, goto leave; } - err = gnupg_spawn_process (opt.gpg_program, argv, NULL, NULL, + err = gnupg_spawn_process (opt.gpg_program, argv, + except[0] == -1? NULL : except, + NULL, (GNUPG_SPAWN_KEEP_STDOUT | GNUPG_SPAWN_KEEP_STDERR), &outstream, NULL, NULL, &pid); |