DosKillProcess allows a process to send the KILLPROCESS exception to another process or group of processes. The default action of the system is to end each of the processes. A process may intercept this action by installing an exception handler for the KILLPROCESS exception (see DosSetExceptionHandler). In such a case, the program will ensure the integrity of its files, and then issue DosExit.

If there is no exception handler, or if no handler handles the exception, then DosKillProcess affects the process as if one of its threads has issued DosKillProcess for the entire process. All file buffers are written, and the handles opened by the process are closed. Any internal buffers managed by the program externally of the system are not written. An example of such a buffer is a C-language library internal character buffer.

The parent of the process gets the "Unintercepted DosKillProcess" termination code when it issues DosWaitChild.

The "ERROR_ZOMBIE_PROCESS" error code indicates that the specified process has ended, but its parent has not yet issued DosWaitChild to get its return code.


[Back] [Next]