xsuchy / fedora-upgrade

Upgrade Fedora to next version using DNF upgrade without the need to reboot during the upgrade.
GNU General Public License v2.0
43 stars 16 forks source link

Clear the stdin buffer before question #9

Closed lzap closed 10 years ago

lzap commented 10 years ago

For some reason, upgrade was cancelled for me twice today. In both cases thanks to extra characters in stdin buffer when yum (then rpmconf) were cancelled.

This patch reads 10000 characters in one second to clear the stdin buffer prior to asking. This is standard practice which prevents this kinds of errors.