-2

I want to make an app I have impossible to quit by normal means, only by forcequitting. Is this possible? (I do have limited knowledge of bash)

I use MacOSX ElCapitan. Thank you in advance for the help!

Edit: To clarify, I want it not to be able to quit with +Q or by rightclicking the app and pressing quit, or quitting through the App menu on the top bar.

AAM111
  • 1,178
  • 3
  • 19
  • 39

1 Answers1

-1

You could intercept any control-c type signals with a signal handler. Here is an example:

#!/bin/bash
trap "echo 'Caught Signal'" SIGHUP SIGINT SIGTERM
while true; do
    echo "looping"
    sleep 5
done
John C
  • 4,276
  • 2
  • 17
  • 28