handle linux' weird tty error codes