diff --git a/g10/ChangeLog b/g10/ChangeLog index c0d5b0c03..21e5064c3 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,7 @@ 2003-07-30 Werner Koch + * passphrase.c (agent_send_all_options): Make use of $GPG_TTY. + * photoid.c, passphrase.c, g10.c, exec.c: Replaced some __MINGW32__ by _WIN32. diff --git a/g10/passphrase.c b/g10/passphrase.c index 960069c3e..a04874fe8 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -374,7 +374,11 @@ agent_send_all_options (int fd) } if (!opt.ttyname) - dft_ttyname = tty_get_ttyname (); + { + dft_ttyname = getenv ("GPG_TTY"); + if ((!dft_ttyname || !*dft_ttyname) && tty_get_ttyname ()) + dft_ttyname = tty_get_ttyname (); + } if (opt.ttyname || dft_ttyname) { if (agent_send_option (fd, "ttyname",