aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 28841c0aa..019079047 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -39,6 +39,9 @@
#ifdef HAVE_W32_SYSTEM
#include <windows.h>
#endif
+#ifdef __VMS
+# include "vms.h"
+#endif
#define INCLUDED_BY_MAIN_MODULE 1
#include "packet.h"
@@ -1872,6 +1875,15 @@ main (int argc, char **argv )
opt.lock_once = 1;
#endif /* __riscos__ */
+#ifdef __VMS
+ /* On VMS, set the default value of the "--[no-]batch" flag
+ * according to the actual process mode. The user can override
+ * this with an explicit command-line "--[no-]batch" option. This
+ * avoids that the process stops while trying to initialize the
+ * tty in batch mode. */
+ opt.batch = batch_mode_vms();
+#endif
+
reopen_std();
trap_unaligned();
secmem_set_flags( secmem_get_flags() | 2 ); /* suspend warnings */