[pacman-dev] [RFC] Proposed fix for FS#20538

Dan McGee dpmcgee at gmail.com
Thu Mar 24 01:18:20 EDT 2011


On Wed, Mar 23, 2011 at 10:41 AM, Dave Reisner <d at falconindy.com> wrote:
> https://bugs.archlinux.org/task/20538
>
> The attached patch flushes the terminal input buffer shortly before
> prompting users for input to answer a question. On the one hand, I can
> see how this might be nice when you accidentally hit <enter> twice, or
> fat finger a key during a download and press <enter> at the prompt only
> to be oddly returned to your shell. On the other hand, I've occasionally
> abused this exact behavior to walk away from my computer in the middle
> of a large -Syu.
>
> Thoughts? Any issues with the code approach?

You only use it in util, mark it static and drop it from util.h.

Is this stuff we should guard using autoconf? I think if you add it to
AC_CHECK_HEADERS and AC_CHECK_FUNCS you'll have useful #defines usable
from config.h.

-Dan


More information about the pacman-dev mailing list