summaryrefslogtreecommitdiffstats
path: root/tools/gpgtar-list.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 21:21:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 21:21:05 +0000
commite7fd617327ed9d30f093a78a016511ab5c984ba4 (patch)
treebb534b4fd912969c90022ad00726253be891ad8a /tools/gpgtar-list.c
parentReleasing progress-linux version 2.2.40-3~progress7.99u1. (diff)
downloadgnupg2-e7fd617327ed9d30f093a78a016511ab5c984ba4.tar.xz
gnupg2-e7fd617327ed9d30f093a78a016511ab5c984ba4.zip
Merging upstream version 2.2.43.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/gpgtar-list.c')
-rw-r--r--tools/gpgtar-list.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gpgtar-list.c b/tools/gpgtar-list.c
index 08ab967..37951d6 100644
--- a/tools/gpgtar-list.c
+++ b/tools/gpgtar-list.c
@@ -468,6 +468,7 @@ gpgtar_list (const char *filename, int decrypt)
{
strlist_t arg;
ccparray_t ccp;
+ int except[2] = { -1, -1 };
const char **argv;
ccparray_init (&ccp, 0);
@@ -481,6 +482,7 @@ gpgtar_list (const char *filename, int decrypt)
snprintf (tmpbuf, sizeof tmpbuf, "--status-fd=%d", opt.status_fd);
ccparray_put (&ccp, tmpbuf);
+ except[0] = opt.status_fd;
}
ccparray_put (&ccp, "--output");
ccparray_put (&ccp, "-");
@@ -501,7 +503,9 @@ gpgtar_list (const char *filename, int decrypt)
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,
((filename? 0 : GNUPG_SPAWN_KEEP_STDIN)
| GNUPG_SPAWN_KEEP_STDERR),
NULL, &stream, NULL, &pid);