home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / kill9.zip / xfree86 / src / death / readme < prev   
Text File  |  1996-06-29  |  2KB  |  51 lines

  1. This README describes a special new function of XF86SUP.SYS 1.455 or
  2. later.
  3.  
  4. This XF86SUP driver has a new IOCTL function built in which can kill
  5. arbitrary processes, even if other "kill" programs, including watchcat
  6. consider them as "unkillable".
  7.  
  8. This is possible because of a new undocumented function in fixpack 17.
  9.  
  10. The directory "DEATH" provides a user API and a sample application which
  11. makes use of the function.
  12.  
  13. API:
  14.     Send an IOCTL of category 0x76, function code 0x65 to the driver
  15.     "FASTIO$". It must be given an USHORT process ID of the process to
  16.     be killed as the parameter packet.
  17.  
  18.     With the provided makefile you can build a library for VAC++, 
  19.     Watcom 10.X and EMX/gcc which provides this ioctl in a function
  20.  
  21.     extern "C" APIRET death(PID proc_to_kill);
  22.  
  23. Sample code:
  24.  
  25.     DEATH.EXE
  26.  
  27.     Pass it a decimal process ID as the first argument. Source code for
  28.     this applet is available.
  29.  
  30. Notes:
  31.  
  32.     1. FASTIO$ has been protected to reject to kill processes with a
  33.        PID < 13. These processes (e.g. PMSHELL) can hang the system
  34.        severely, if they contain (like PMSHELL.EXE) the session manager.
  35.     2. In contrast to DosKillProcess, you can only kill one process
  36.        at a time, not a process tree.
  37.     3. The killed process receives a CTRL-BREAK signal which it cannot
  38.        catch with an exception handler. This means that it has no chance
  39.        to do cleanup, e.g. save write buffers to disk or close files.
  40.  
  41. A simple "immortal" program to test the code is PIG.EXE. It catches all
  42. exceptions (including the CTRL-C, CTRL-BREAK, and DosKillProcess) signals
  43. with an own exception handler, and wraps itself in a "Must Complete" section.
  44. DEATH.EXE can kill it.
  45.  
  46.  
  47. Feel free to use the API and the sample code in own applications.
  48.  
  49. Holger Veit
  50.  
  51.