aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 2eb4fd51d..a095795f7 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4167,6 +4167,15 @@ main (int argc, char **argv)
opt.passphrase_repeat = 0;
}
+ /* If no pinentry is expected shunt
+ * gnupg_allow_set_foregound_window to avoid useless error
+ * messages on Windows. */
+ if (opt.pinentry_mode != PINENTRY_MODE_ASK)
+ {
+ gnupg_inhibit_set_foregound_window (1);
+ }
+
+
if (cmd == aGPGConfTest)
g10_exit(0);