INFO: Process Will Not Terminate Unless System Is In User-mode

ID: Q92761

3.10 3.50
WINDOWS NT
kbprg
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), used with:
    • Microsoft Windows NT versions 3.1, 3.5
    • Microsoft Windows 2000


SUMMARY

Under Windows NT, a process will not be terminated unless the system is in user-mode. Suppose that TerminateProcess() is called while a device driver or filesystem code is being executed. The system will wait until the threads are running user code before marking the process for termination. On system exit, processes that were the target of a TerminateProcess() will be killed.

This may affect drivers. If a driver is waiting for an object or multiple objects in WaitMode or UserMode, its wait may complete unsuccessfully due to a termination request. Any code that does a UserMode wait or an Alertable wait must check the return status of the wait call. If the wait fails with STATUS_USER_APC or STATUS_ALERTED, this is not an error. The driver should cleanup and return to user-mode.

Additional query words: 3.10 3.50

Keywords : kbprg kbKernBase kbWinOS2000 kbThread kbWinOS310 kbDSupport kbWinOS350 kbGrpKernBase
Version : winnt:3.1,3.5
Platform : winnt
Issue type : kbinfo


Last Reviewed: January 11, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.