MCPcopy Create free account
hub / github.com/Kitware/CMake / kwsysProcessesInitialize

Function kwsysProcessesInitialize

Source/kwsys/ProcessWin32.c:2606–2620  ·  view source on GitHub ↗

Initialize critial section and set up console Ctrl handler. You MUST call this before using any other kwsysProcesses* functions below. */

Source from the content-addressed store, hash-verified

2604/* Initialize critial section and set up console Ctrl handler. You MUST call
2605 this before using any other kwsysProcesses* functions below. */
2606static int kwsysProcessesInitialize(void)
2607{
2608 /* Initialize everything if not done already. */
2609 if (!kwsysProcesses.Initialized) {
2610 InitializeCriticalSection(&kwsysProcesses.Lock);
2611
2612 /* Set up console ctrl handler. */
2613 if (!SetConsoleCtrlHandler(kwsysCtrlHandler, TRUE)) {
2614 return 0;
2615 }
2616
2617 kwsysProcesses.Initialized = 1;
2618 }
2619 return 1;
2620}
2621
2622/* The Ctrl handler waits on the global list of processes. To prevent an
2623 orphaned process, do not create a new process if the Ctrl handler is

Callers 2

kwsysProcess_NewFunction · 0.85
kwsysProcessesAddFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…