How can I disable force quit from within my java application? Either that, or how about disabling it from .plist?
Asked
Active
Viewed 685 times
1
-
4You ... want to stop the user from being able to exit your application? Why? – Anon. Jun 30 '10 at 00:14
-
1kiosk application. You dont want the user to be able to exit to the system. I want to intersect the force quit process so only a admin can quit – Jakir00 Jun 30 '10 at 00:21
-
6You don't want to be stopping the SIGKILL - you want to instead set up the kiosk so that the user is unable to access the Force Kill interface. – Anon. Jun 30 '10 at 01:10
3 Answers
4
You cannot disable force-quit in an application. Force-Quit is equivalent to sending the SIGKILL signal. By definition:
The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.

Andres Jaan Tack
- 22,566
- 11
- 59
- 78
1
You can't. There is no way to handle SIGKILL, which will always terminate the application (Java or otherwise).

Matthew Flaschen
- 278,309
- 50
- 514
- 539
1
I found a workaround. Using the .plist key "Application is agent (UIElement)" the application does not show up on the force quit list!

Jakir00
- 2,023
- 4
- 20
- 32
-
2Which list are you talking about? The one you get with Command-Option-Esc? Surely, that process shows up in the Activity Monitor, doesn't it? As others have said you can't stop SIGKILL (but you might indeed be able prevent someone from sending it...) – Bruno Jun 30 '10 at 00:56