[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#84: Acknowledgement (23.0.60; Occasional hangs in flyspell-mode and

From: Markus Triska
Subject: bug#84: Acknowledgement (23.0.60; Occasional hangs in flyspell-mode and ispell-word)
Date: Tue, 08 Jul 2008 15:25:20 +0200

Here's a test case which I think illustrates part of the problem: Let
hang.el contain only the form:

     (insert "test")
     (let ((n 0))
       (while t
         (setq n (1+ n))
         (when (= (mod n 1000) 0)
           (message "%s" (emacs-uptime)))
         (condition-case err
             (ispell-word nil t)
           (error (message "error: %s" err))))))

and do:

   $ emacs -Q --script hang.el

This continuously spell-checks the word "test". In another terminal,
kill the aspell process:

   $ killall -s 9 aspell

Different things can then happen to the Emacs process, depending on its
exact state when you kill aspell:

a) error: (error SIGPIPE raised on process ispell; closed it)

b) error: (error Process ispell not running)

c) Emacs hangs, waiting for more output from aspell

In cases (a) and (b), Emacs continues as normal after it has
automatically restarted aspell. Case (c) seems to be part of the
original problem, which I think can happen as follows: Aspell crashes
while flyspell-word waits for output; one can interrupt the wait with
C-g, but because no error was risen, flyspell-post-command-hook is not
removed from post-command-hook, and is still triggered after each
command (including pressing C-g itself), thus resulting in new waits.

Thus, instead of waiting for more output from a dead process, doesn't an
error seem preferable?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]