Exit at rare events when writing to tty is unsuccessful. Signed-off-by: Sami Kerola <kerolasa@iki.fi>