aboutsummaryrefslogtreecommitdiffstats
path: root/common/exechelp.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2022-03-15 08:33:09 +0000
committerWerner Koch <[email protected]>2022-03-18 10:14:54 +0000
commit6d6438a361d25f3b269f702e017f5e39fd1f5c38 (patch)
treec44dbcafde60dfaa1bd49cad9ef456246dd0eaf8 /common/exechelp.h
parentcommon: Fix a race condition removing stale lockfile. (diff)
downloadgnupg-6d6438a361d25f3b269f702e017f5e39fd1f5c38.tar.gz
gnupg-6d6438a361d25f3b269f702e017f5e39fd1f5c38.zip
common: New flags for gnupg_spawn_process
* common/exechelp.h (GNUPG_SPAWN_KEEP_STDIN): New. (GNUPG_SPAWN_KEEP_STDOUT): New. (GNUPG_SPAWN_KEEP_STDERR): New. * common/exechelp-posix.c (do_exec): Add arg flags and implement new flags. * common/exechelp-w32.c (gnupg_spawn_process): Implement new flags.
Diffstat (limited to 'common/exechelp.h')
-rw-r--r--common/exechelp.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/common/exechelp.h b/common/exechelp.h
index d50e378e7..735ea4728 100644
--- a/common/exechelp.h
+++ b/common/exechelp.h
@@ -76,7 +76,9 @@ void gnupg_close_pipe (int fd);
#define GNUPG_SPAWN_NONBLOCK 16
#define GNUPG_SPAWN_RUN_ASFW 64
#define GNUPG_SPAWN_DETACHED 128
-
+#define GNUPG_SPAWN_KEEP_STDIN 256
+#define GNUPG_SPAWN_KEEP_STDOUT 512
+#define GNUPG_SPAWN_KEEP_STDERR 1024
/* Fork and exec the program PGMNAME.
@@ -122,6 +124,12 @@ void gnupg_close_pipe (int fd);
the child. Note that due to unknown problems this actually
allows SetForegroundWindow for all children of this process.
+ GNUPG_SPAWN_KEEP_STDIN
+ GNUPG_SPAWN_KEEP_STDOUT
+ GNUPG_SPAWN_KEEP_STDERR
+ Do not assign /dev/null to a non-required standard file
+ descriptor.
+
*/
gpg_error_t
gnupg_spawn_process (const char *pgmname, const char *argv[],