Commands running in terminal not running from script

I have to say I got completely lost in your deep dive to shells, nested shells, child shells, sub-proccesses, etc... heheh
Don't take me wrong, and unless you have interest in the subject, I don't think I need a so deep level of security. As I said, I'm doing this for learning purposes and also to as a way of making this proccess kind of more user friendly. But this is only for my own usage, so if this is a complex subject that doesn't worth your time, don't bother. I can live only with the fact that CTRL+C and eventually trying to close the terminal window, either automatically closes the VM (gracefully or not) and safelly closes the the container. (dinner time, maybe a take a bit longer to change code and repost it)