[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11536: 23.4; frequent spurious auto-save while typing
From: |
Chong Yidong |
Subject: |
bug#11536: 23.4; frequent spurious auto-save while typing |
Date: |
Sat, 03 Nov 2012 23:46:36 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Jim Paris <jim@jtan.com> writes:
> The call to keyboard.c:set_waiting_for_input is essentially telling the
> keyboard.c:input_available_signal handler to reset &timeout to zero in
> the case of SIGIO. However, consider what happens if a key is pressed
> and SIGIO is received between set_waiting_for_input and select.
> Then timeout will have been set to zero, and select will return
> immediately with nfds == 0. The check in 5007 will then break the
> while loop, causing wait_reading_process_output to return immediately
> without any data having been read -- triggering the auto-save back
> in keyboard.c:read_char.
>
> It seems the fix is simple: remove lines 5007-5009. It's a small
> optimization that isn't necessary, because the later check at line 5129
> already covers the case where nfds == 0. Continuing the loop is fine,
> because the top of the loop checks for an expired timeout and returns.
Thanks for the bug report and the analysis. I couldn't reproduce the
problem, but off the top of my head the analysis is correct, so I've
made the change you suggested in trunk.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#11536: 23.4; frequent spurious auto-save while typing,
Chong Yidong <=