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

Function kwsysProcessesUpdate

Source/kwsys/ProcessUNIX.c:2659–2677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2657static struct sigaction kwsysProcessesOldSigTermAction;
2658
2659static void kwsysProcessesUpdate(kwsysProcessInstances* newProcesses)
2660{
2661 /* Block signals while we update the set of pipes to check.
2662 TODO: sigprocmask is undefined for threaded apps. See
2663 pthread_sigmask. */
2664 sigset_t newset;
2665 sigset_t oldset;
2666 sigemptyset(&newset);
2667 sigaddset(&newset, SIGCHLD);
2668 sigaddset(&newset, SIGINT);
2669 sigaddset(&newset, SIGTERM);
2670 sigprocmask(SIG_BLOCK, &newset, &oldset);
2671
2672 /* Store the new set in that seen by the signal handler. */
2673 kwsysProcesses = *newProcesses;
2674
2675 /* Restore the signal mask to the previous setting. */
2676 sigprocmask(SIG_SETMASK, &oldset, 0);
2677}
2678
2679static int kwsysProcessesAdd(kwsysProcess* cp)
2680{

Callers 2

kwsysProcessesAddFunction · 0.85
kwsysProcessesRemoveFunction · 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…