INFO: Process Will Not Terminate Unless System Is In User-mode |
Q92761
3.10 3.50
WINDOWS NT
kbprg
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), used with:
- the operating system: Microsoft Windows NT, versions 3.1, 3.5
- the operating system: 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 : kbprogramming kbKernBase kbOSWin2000 kbThread kbOSWin310 kbDSupport kbOSWinNT350 kbGrpDSKernBase
Issue type : kbinfo
Technology : kbAudDeveloper kbWin32sSearch kbWin32API
Last Reviewed: October 22, 2000 |