Fixed setting of raw mode in case of non-blocking mode and CTRL+C.