From: Daiki Ueno Date: Fri, 4 Jan 2013 22:51:52 +0000 (+0900) Subject: * epg.el (epg--start): Don't call "tty" program on W32 platforms. X-Git-Tag: emacs-24.3.90~173^2~7^2~400 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=00cd4c1cbd961403ae8e07fca4ffdbc26f84f5db;p=emacs.git * epg.el (epg--start): Don't call "tty" program on W32 platforms. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c34f256b955..60b25d5ff66 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-01-04 Daiki Ueno + + * epg.el (epg--start): Don't call "tty" program on W32 platforms. + Suggested by Eli Zaretskii . + 2013-01-04 Michael Albinus * net/tramp-sh.el (tramp-set-file-uid-gid): UID and GID must be diff --git a/lisp/epg.el b/lisp/epg.el index ff32661ada9..01f7210c9a9 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1166,12 +1166,13 @@ This function is for internal use only." ;; Set GPG_TTY and TERM for pinentry-curses. Note that we can't ;; use `terminal-name' here to get the real pty name for the child ;; process, though /dev/fd/0" is not portable. - (with-temp-buffer - (condition-case nil - (when (= (call-process "tty" "/dev/fd/0" t) 0) - (delete-backward-char 1) - (setq terminal-name (buffer-string))) - (file-error))) + (unless (memq system-type '(ms-dos windows-nt)) + (with-temp-buffer + (condition-case nil + (when (= (call-process "tty" "/dev/fd/0" t) 0) + (delete-backward-char 1) + (setq terminal-name (buffer-string))) + (file-error)))) (when terminal-name (setq process-environment (cons (concat "GPG_TTY=" terminal-name)