MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / check_active_before_startup_processes

Function check_active_before_startup_processes

mcp/pacemaker.c:662–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660}
661
662static gboolean
663check_active_before_startup_processes(gpointer user_data)
664{
665 int start_seq = 1, lpc = 0;
666 static int max = SIZEOF(pcmk_children);
667 gboolean keep_tracking = FALSE;
668
669 for (start_seq = 1; start_seq < max; start_seq++) {
670 for (lpc = 0; lpc < max; lpc++) {
671 if (pcmk_children[lpc].active_before_startup == FALSE) {
672 /* we are already tracking it as a child process. */
673 continue;
674 } else if (start_seq != pcmk_children[lpc].start_seq) {
675 continue;
676 } else if (crm_pid_active(pcmk_children[lpc].pid) != 1) {
677 crm_notice("Process %s terminated (pid=%d)",
678 pcmk_children[lpc].name,
679 pcmk_children[lpc].pid);
680 pcmk_process_exit(&(pcmk_children[lpc]));
681 continue;
682 }
683 /* at least one of the processes found at startup
684 * is still going, so keep this recurring timer around */
685 keep_tracking = TRUE;
686 }
687 }
688
689 return keep_tracking;
690}
691
692static void
693find_and_track_existing_processes(void)

Callers

nothing calls this directly

Calls 2

crm_pid_activeFunction · 0.85
pcmk_process_exitFunction · 0.85

Tested by

no test coverage detected