SIGINT handler for interactive shell to write commands history