[haiku-development] Emergency keyboard shortcut handler

  • From: Jan Klötzke <jan.kloetzke@xxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 26 Jun 2008 21:14:52 +0200


the attached patch series adds a emergency keyboard shortcut very much like the
magic SysReq key under Linux. If you press Shift+F12+<char> then a number of
different operations can be executed:

Shift+F12+s -> Sync disks
         +b -> reBoot
         +o -> Off (shutdown)
         +t -> dump Threads
         +l -> dump Locks
         +f -> print stack Frames from all CPU's

Of course further operations can be added quite easily.

It's all implemented as separate "emergency" module which is loaded from the
PS2 and USB keyboard drivers. If the emergency module is not available then the
keyboard drivers simply won't use it. Furthermore most of the operations simply
use the registered KLD commands so no real overhead or code duplication.

The real advantage is that with these patches you can e.g. sync the syslog even
  - you use a USB keyboard
  - the graphics card driver locked up
  - no shell is available
  - you name it...

Hope that it's usefull...


Other related posts: