Can I tell Terminal that it is allowed to kill processes if asked?
Mojave on my iMac routinely applies its own updates and reboots itself, with most running programs returning to a reasonable copy of their pre-reboot state. That's fine, especially since these updates can take quite a long time. I don't want to sit waiting for them.
But I do web app development, and there are typically several different node.js web servers running in terminal windows. It's convenient to leave them running all the time. Using nodemon
, they automatically restart when I change the server code, which is handy.
But when an update wants to reboot the system, the terminal windows running the servers all ask me whether I'm OK with killing the process, and sit waiting for an answer. Meanwhile, I'm in bed. And in the morning I have to say "yes", and then wait tediously for the update to complete. If I don't do it then, I forget about it, and see just the same thing the next morning.
Is there any way that I can script my code to tell the terminal program in advance that, if someone asks, it is ok to kill the running process?
Solution 1:
Open Terminal Preferences → Profiles → your profile → Shell and switch ‘Ask before closing’ to ‘Never’.