enhancing Force Quit or improving user-driven diagnostics
John Hawkinson <jhawk-DPNOqEs/[email protected]> Sun, 15 Jan 2012 11:18:18 -0500 (EST)
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
I've had a number of cases recently where I would like to encourage some of my site's users to SIGABRT processes when they hang (so I can at least have a crash report to take to a software vendor or stare at myself, and maybe even a core dumps), but some of my users really really like to Force Quit when things go wrong (and they're in a hurry). While trying to modify user behavior is hard, I'd like to give them the option to send SIGABRT and make it as easy as possible. Is it possible to trap the Cmd-Opt-Escape sequence and redirect it to a custom implementation? Is there any prior art in this space? I understand that it currently goes to loginwindow, and I assume there is no hope in modifying loginwindow to add one more button. [Hmm. Maybe I could modify loginwindow to send SIGABRT instead of SIGKILL though? That might be unwise. ] I know I can disable force quit entirely with the Kiosk API and kUIOptionDisableForceQuit. But that's not very palatable. (Though I suppose if I could disable it and then bind another key to invoke my custom app, that would not be so bad). Is it practical to use a Quartz Event Tap for this purpose? Thoughts appreciated. (It's not for "my app" so I suppose this is a sysadmin-ish kind of question, but I'm certainly prepared to write code to accomplish it.) TANGENT: Another thing I would like to do is to take a screenshot of app state at the time a crash happens. Does anyone have any experience extending ReportCrash to do something like that? Perhaps it is as easy as a shell-script wrapper. It is amusing to me that my ability to take screenshots of app state at crash time improves exponentially when core dumps are enabled. When you have tends of seconds to realize the app is crashing, taking a screenshot is pretty easy. And they can be invaluable in debugging complex problems. Thanks, all. [email protected] John Hawkinson p.s.: If you think this is off-topic for this list, I'd appreciate a redirection.