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

Re: Bug#153530: apt-get installs packages even if I say "n"



On 22 Jul 2002, Ron Johnson wrote:

> Ok, I'll bite.  How do you drain input before displaying the
> prompt?  Would that "input draining" affect things, since
> instead of just pasting one command, I pasted 2?

You use a non blocking read on stdin until there is no data to read before
displaying the prompt. That ensures that you have to type something after
the prompt is shown.

It makes things like yes | apt-get not work though, and generally isn't
necessary.

Jason


-- 
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: