How to block "Force quit" from activity monitor on my application

Hi, i develop an app which run as daemon. I have to block force quit button. Becasuse i dont want to start app after crash or successful exit, i cannot set "KeepAlive" in plist.

Summary:

  • app not started automatically after crash
  • app not started automatically after exit with 0 exit code
  • app not started automatically after exit with non 0 exit code
  • admin user is not able to do ForcedQuit an app from Activity monitor

Is there any workaround to set app like this? Thank you

If somebody is deliberately issuing a force-quit or a SIGKILL against a daemon or agent (which mostly or entirely lack a UI, and quite possibly operating "behind" XPC) and you need to prevent that force-quit or SIGKILL, there are seemingly bigger issues with the app design, or with the administration of the Mac.

Might you be writing either security-related code (malware scanner, etc), or maybe code that's caching data when it probably shouldn't (and thus also potentially vulnerable to ill-timed power outages)? Remediating those two situations goes in very different directions...

For anyone here unfamiliar with the, um, background: Technical Note TN2083: Daemons and Agents

How to block "Force quit" from activity monitor on my application
 
 
Q