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

Function pcmk_process_exit

mcp/pacemaker.c:131–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131static void
132pcmk_process_exit(pcmk_child_t *child)
133{
134 child->pid = 0;
135 child->active_before_startup = FALSE;
136
137 /* Broadcast the fact that one of our processes died ASAP
138 *
139 * Try to get some logging of the cause out first though
140 * because we're probably about to get fenced
141 *
142 * Potentially do this only if respawn_count > N
143 * to allow for local recovery
144 */
145 update_node_processes(local_nodeid, NULL, get_process_list());
146
147 child->respawn_count += 1;
148 if (child->respawn_count > MAX_RESPAWN) {
149 crm_err("Child respawn count exceeded by %s", child->name);
150 child->respawn = FALSE;
151 }
152
153 if (shutdown_trigger) {
154 mainloop_set_trigger(shutdown_trigger);
155 update_node_processes(local_nodeid, NULL, get_process_list());
156
157 } else if (child->respawn) {
158 crm_notice("Respawning failed child process: %s", child->name);
159 start_child(child);
160 }
161}
162
163static void pcmk_child_exit(GPid pid, gint status, gpointer user_data)
164{

Callers 2

pcmk_child_exitFunction · 0.85

Calls 4

update_node_processesFunction · 0.85
mainloop_set_triggerFunction · 0.85
start_childFunction · 0.85
get_process_listFunction · 0.70

Tested by

no test coverage detected