summaryrefslogtreecommitdiff
path: root/lisp/epg.el
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@debian>2013-01-05 07:51:52 +0900
committerDaiki Ueno <ueno@debian>2013-01-05 07:51:52 +0900
commit00cd4c1cbd961403ae8e07fca4ffdbc26f84f5db (patch)
tree4f62d2db0d62fa7f12e7b39849f638a553b5b6a0 /lisp/epg.el
parent0f668a4db4a33f98f84613513af3efea521b4847 (diff)
downloademacs-00cd4c1cbd961403ae8e07fca4ffdbc26f84f5db.tar.gz
* epg.el (epg--start): Don't call "tty" program on W32 platforms.
Diffstat (limited to 'lisp/epg.el')
-rw-r--r--lisp/epg.el13
1 files changed, 7 insertions, 6 deletions
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)