b6183403ae
appropriately. Exit from the bottom. Correctly deal with third argument for TCFLSH. (Suggested by Sergey Okhapkin)