PRB: System Shutdown Is Blocked While Awaiting User Input in Console Session (325186)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows XP
    • the operating system: Microsoft Windows Server 2003

This article was previously published under Q325186

SYMPTOMS

When a system shutdown operation is initiated by means of the Win32 ExitWindowsEx function, the InitiateSystemShutdown function, or the InitiateSystemShutdownEx function, the caller must specify whether programs with unsaved changes are to be forcibly closed.

If the caller chooses not to force these programs to close, and a program with unsaved changes is running on the console session, the shutdown process does not complete until after the user who is logged onto the console session aborts the shutdown, saves changes, closes the program, or forces the program to close. During this time period, only the console user can abort the shutdown, and you cannot initiate another shutdown operation.

CAUSE

While programs with unsaved changes are waiting for the response of the user in the console session, the system does not accept incoming shutdown requests.

RESOLUTION

To prevent this situation, call the system shutdown functions with the force flag.

NOTE: Using the force flag may result in loss of unsaved changes in programs that are open.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Log on to the console session, open Notepad or a similar program, and then type some text without saving the file.
  2. Initiate a system shutdown by means of the Start menu, and do not save, discard, or cancel the text in Notepad.
  3. After a short delay, the End Program dialog box appears. Do not click the button to end the program.

    Attempts to initiate a new shutdown do not succeed until after you close the End Program dialog box or the Notepad dialog box about saving changes.

REFERENCES

For more information about the shutdown functions, see the Platform Software Development Kit.

Modification Type:MinorLast Reviewed:10/30/2003
Keywords:kbAPI kbKernBase kbprb KB325186