GNU bug report logs -
#11536
23.4; frequent spurious auto-save while typing
Previous Next
Reported by: Jim Paris <jim <at> jtan.com>
Date: Mon, 21 May 2012 21:24:02 UTC
Severity: normal
Tags: moreinfo
Found in version 23.4
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Jim Paris <jim <at> 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.
This bug report was last modified 3 years and 328 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.