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

Dave Reisner d at falconindy.com
Thu Mar 24 09:23:23 EDT 2011


On Thu, Mar 24, 2011 at 12:18:20AM -0500, Dan McGee wrote:
> 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
> 

Done, and done. I've made flush_term_input effectively a NOOP when
tcflush isn't available. Changes are in my GH repo [1].

dave

[1] http://goo.gl/qQG91


More information about the pacman-dev mailing list