| 129 | } |
| 130 | |
| 131 | static void |
| 132 | pcmk_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 | |
| 163 | static void pcmk_child_exit(GPid pid, gint status, gpointer user_data) |
| 164 | { |
no test coverage detected