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?

  • 1
    Alternatively, you could set all except OS updates to be automatic, then you could just start the process manually before you go off for the night. i.stack.imgur.com/qq8TH.png
    – Tetsujin
    Aug 7, 2019 at 9:09

1 Answer 1


Open Terminal Preferences → Profiles → your profile → Shell and switch ‘Ask before closing’ to ‘Never’.

  • Thanks very much! I never imagined that terminal had such hidden depths!
    – emrys57
    Aug 7, 2019 at 13:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .