From bf085ce8f161b474ea60de7bcaa85aaf59f12d26 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Mon, 1 Dec 2014 11:44:39 +0900 Subject: [PATCH] Yet another fix for #405. --- elisp/ghc-process.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elisp/ghc-process.el b/elisp/ghc-process.el index 33203b1..00aed43 100644 --- a/elisp/ghc-process.el +++ b/elisp/ghc-process.el @@ -111,9 +111,11 @@ (setq ghc-process-results nil) (setq ghc-process-num-of-results (or n 1)) (let ((pro (ghc-with-process cmd 'ghc-process-callback nil hook))) + ;; ghc-process-running is now t. + ;; But if the process exits abnormally, it is set to nil. (condition-case nil (let ((inhibit-quit nil)) - (while (null ghc-process-rendezvous) + (while (and (null ghc-process-rendezvous) ghc-process-running) (accept-process-output pro 0.1 nil t))) (quit (setq ghc-process-running nil))))