PRB: TerminateProcess() Does Not Terminate the Target Process (270117)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 4.0
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows XP
This article was previously published under Q270117 SYMPTOMS
A process continues to exist after a call to the TerminateProcess function on that process has successfully returned.
CAUSE
When there is a request to terminate a process through the TerminateProcess function, Windows stops all the user-mode activity of the target process. However, the target process cannot actually exit until all kernel-mode activity specific to that process is complete. This means that the target process continues to exist until all of its threads have left kernel-mode and all pending IO has been canceled.
This situation occurs as the result of a device driver not releasing a thread or not canceling IO. The process continues to exist until the IO completes and all threads in the process are released from kernel mode.
RESOLUTION
Device drivers should be written such that they meet the following criteria:
- They have a Cancel Routine and properly cancel any IO when requested. See the relevant Windows NT DDK for more information on Cancel Routines.
- They never keep an application-owned thread longer than is necessary.
STATUS
This behavior is by design.
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
192463 Gathering Blue Screen Information After Memory Dump
More information on Windows NT kernel-mode debugging can be found on the Microsoft Developer Network (MSDN) Web site:
Modification Type: | Major | Last Reviewed: | 12/18/2003 |
---|
Keywords: | kbKernBase kbprb KB270117 |
---|
|