Add the reset atexit handler right after setting the terminal to raw mode, so we...