bug-gnu-emacs
[Top][All Lists]
Advanced

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

SIT-FOR doesn't sit when minimized


From: Bill Brodie
Subject: SIT-FOR doesn't sit when minimized
Date: Thu, 19 Jul 2001 16:27:01 -0400 (EDT)

In GNU Emacs 20.7.1 (i386-*-nt5.0.2195)
 of Tue Jun 13 2000 on buffy
configured using `configure NT'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I've implemented a function in emacs that sends input to a program running
within a shell buffer, waits for output to be produced, then writes the
output to a file.  The wait loop is implemented as follows:

        (switch-to-buffer "*shell*")
        (goto-char (point-max))
        (save-excursion
          (insert query)
          (goto-char (point-max))
          (comint-send-input)
          (while (not (save-excursion
                        (goto-char (- (point-max) 5))
                        (looking-at "SQL> \\'")))
            (sit-for 1)))
        (forward-line 2)
        ;; Process output
        ...

This works fine; Windows Task Manager shows that emacs is consuming no CPU
time while it's in the wait loop.  But if I minimize the window in which
Emacs is running (under Windows NT 4 SP 5 or Windows 2000 SP 2), emacs
starts chewing up 100% of the machine's CPU cycles; I assume this is
because SIT-FOR thinks there's "input" pending.  If I restore the window,
emacs' CPU usage doesn't go back down.  However, if I interrupt the process
(using Ctrl-G) with debug-on-quit set to t, then use "c" from the debugger
to continue it, CPU usage drops back down to zero.



reply via email to

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