Prevent SIGTERM & SIGKILL when using shutdown on macos
Is there any way to prevent sending the sigterm & sigkill when using shutdown? I have a script which puts my mac to sleep, which contains shutdown -s to put my mac to sleep. Only I would like it not to send the sigkill to all my open terminals. Is that possible?
Instead of shutdown -s
you can use one of
pmset sleepnow
osascript -e 'tell app "System Events" to sleep'