have Bterm return an error if it can't flush its buffer.