I'm currently working on a web project on uWSGI, it's quite a chore to keep typing the same command in the terminal everytime I want to start up uWSGI, so I made an executable script that will automatically run the process when I execute it.
It works, but the problem is, normally when I run uWSGI from the terminal manually (by typing in the commands), when I try to close the terminal window while the process is still running, it will prompt me if I want to terminate the process before closing the terminal. However, the terminal window that appears after I ran the executable script from GUI will not warn me when I accidentally close the window, and as a result the process will still be running in the background.
How can I make the script such that it will display a warning like it normally will when I try to close the terminal window when the process is still running?