aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2019-08-08 16:17:51 +0300
committerEli Zaretskii2019-08-08 16:17:51 +0300
commit691790b8ea5192395a2eeac0f89a2f41d74f2ddb (patch)
tree9ca29974e691807d3c040644fa8242ad62c4edc5
parentb83f83ccd47997b7fd581026d4e1b124fa4fefc2 (diff)
downloademacs-691790b8ea5192395a2eeac0f89a2f41d74f2ddb.tar.gz
emacs-691790b8ea5192395a2eeac0f89a2f41d74f2ddb.zip
Avoid Groff hanging on MS-Windows when invoked by "M-x man"
* lisp/man.el (Man-build-man-command): On MS-Windows, redirect stdin of 'man' to the null device, to make sure Groff exits immediately after formatting the man page.
-rw-r--r--lisp/man.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 409fadb66b8..731d480cbee 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -624,7 +624,13 @@ This is necessary if one wants to dump man.el with Emacs."
624 ;; so we don't need `2>' even with DOS shells 624 ;; so we don't need `2>' even with DOS shells
625 ;; which do support stderr redirection. 625 ;; which do support stderr redirection.
626 ((not (fboundp 'make-process)) " %s") 626 ((not (fboundp 'make-process)) " %s")
627 ((concat " %s 2>" null-device))))) 627 ((concat " %s 2>" null-device
628 ;; Some MS-Windows ports of Groff
629 ;; try to read stdin after exhausting
630 ;; the command-line arguments; make
631 ;; them exit if/when they do.
632 (if (eq system-type 'windows-nt)
633 (concat " <" null-device)))))))
628 (flist Man-filter-list)) 634 (flist Man-filter-list))
629 (while (and flist (car flist)) 635 (while (and flist (car flist))
630 (let ((pcom (car (car flist))) 636 (let ((pcom (car (car flist)))