I wrote a little bash script that opens a new gnome-terminal window. In that window, I need it to run an app which receives some input from the keyboard and produces some output that I want to observe. If the app receives "ex" as the input, it exits. To prevent the terminal from closing immediately when "ex" is the input, I managed to keep it opened with this:
gnome-terminal -- /bin/bash -c "${PATH_TO_APP}; exec /bin/bash -i"
But if I kill the app with Ctrl+C, that terminal will close. How can I keep that terminal window opened when I hit it with a Ctrl+C?