summaryrefslogtreecommitdiff
path: root/lisp/epg.el
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@debian>2013-01-04 08:56:51 +0900
committerDaiki Ueno <ueno@debian>2013-01-04 08:56:51 +0900
commitc2cf1829ddd72c4fa24e7def8d94e8b2ee937a03 (patch)
tree720937c5824a22ecf126a9fce7560816647ebabb /lisp/epg.el
parenta8aa6c2d08c5bf67cae9db62663e69fb183fbddb (diff)
downloademacs-c2cf1829ddd72c4fa24e7def8d94e8b2ee937a03.tar.gz
* epg.el (epg--start): Ignore errors when /dev/fd/0 does not exist.
Diffstat (limited to 'lisp/epg.el')
-rw-r--r--lisp/epg.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/epg.el b/lisp/epg.el
index 6be3ba15a97..ff32661ada9 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1167,9 +1167,11 @@ This function is for internal use only."
;; use `terminal-name' here to get the real pty name for the child
;; process, though /dev/fd/0" is not portable.
(with-temp-buffer
- (when (= (call-process "tty" "/dev/fd/0" t) 0)
- (delete-backward-char 1)
- (setq terminal-name (buffer-string))))
+ (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)