Initialize critial section and set up console Ctrl handler. You MUST call this before using any other kwsysProcesses* functions below. */
| 2604 | /* Initialize critial section and set up console Ctrl handler. You MUST call |
| 2605 | this before using any other kwsysProcesses* functions below. */ |
| 2606 | static 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…