Index: util/ChangeLog
===================================================================
RCS file: /cvs/gnupg/gnupg/util/ChangeLog,v
retrieving revision 1.196
diff -u -p -r1.196 ChangeLog
--- util/ChangeLog	18 Jul 2005 17:58:25 -0000	1.196
+++ util/ChangeLog	10 Dec 2005 20:01:56 -0000
@@ -1,0 +1,6 @@
+2005-12-10  Ryan Lortie  <desrt@desrt.ca>
+
+	* ttyio.c (tty_enable_completion, tty_disable_completion): Add
+	checks for no_terminal so we don't try to open("/dev/tty") when
+	invoked with --no-tty.
+
Index: util/ttyio.c
===================================================================
RCS file: /cvs/gnupg/gnupg/util/ttyio.c,v
retrieving revision 1.39
diff -u -p -r1.39 ttyio.c
--- util/ttyio.c	22 Jul 2005 16:28:40 -0000	1.39
+++ util/ttyio.c	10 Dec 2005 20:01:57 -0000
@@ -179,8 +179,12 @@ init_ttyfp(void)
 void
 tty_enable_completion(rl_completion_func_t *completer)
 {
+  if( no_terminal )
+    return;
+
   if( !initialized )
     init_ttyfp();
+
   rl_attempted_completion_function=completer;
   rl_inhibit_completion=0;
 }
@@ -188,8 +192,12 @@ tty_enable_completion(rl_completion_func
 void
 tty_disable_completion(void)
 {
+  if( no_terminal )
+    return;
+
   if( !initialized )
     init_ttyfp();
+
   rl_inhibit_completion=1;
 }
 #endif /*HAVE_LIBREADLINE*/
