Microsoft KB Archive/328627

From BetaArchive Wiki
Knowledge Base


DOC: New Process Groups Cannot Receive the CTRL+C Signal

PSS ID Number: 328627

Article Last Modified on 5/10/2003



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 Q328627

SUMMARY

If a console process spawns another console process by using CreateProcess() with the CREATE_NEW_PROCESS_GROUP flag, the parent process cannot use GenerateConsoleCtrlEvent() to send the child process a CTRL+C signal.

MORE INFORMATION

The Platform SDK documentation for GenerateConsoleCtrlEvent() incorrectly states that this function can be used to send a CTRL+C signal to a new process group.

In fact, a process launched in a new process group does not receive CTRL+C signals.

Although new process groups cannot receive the CTRL+C signal, they can receive a CTRL+BREAK signal.

This documentation error has been corrected in the most recent version of the MSDN Library.

REFERENCES

The documentation error is currently located at the following MSDN Web site:

Platform SDK: DLLs, Processes, and Threads - GenerateConsoleCtrlEvent
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/generateconsolectrlevent.asp


Keywords: kbAPI kbbug kbConsole kbdocerr kbKernBase kbpending KB328627
Technology: kbAudDeveloper kbOSWin2000 kbOSWinNT400 kbOSWinNTSearch kbOSWinSearch kbOSWinXP kbOSWinXPSearch kbWin32API kbWin32sSearch