| 708 | } |
| 709 | |
| 710 | static void event_note_child_stopped(int slot, pid_t pid, ap_generation_t gen) |
| 711 | { |
| 712 | if (slot != -1) { /* child had a scoreboard slot? */ |
| 713 | process_score *ps = &ap_scoreboard_image->parent[slot]; |
| 714 | int i; |
| 715 | |
| 716 | pid = ps->pid; |
| 717 | gen = ps->generation; |
| 718 | for (i = 0; i < threads_per_child; i++) { |
| 719 | ap_update_child_status_from_indexes(slot, i, SERVER_DEAD, NULL); |
| 720 | } |
| 721 | ap_run_child_status(ap_server_conf, pid, gen, slot, MPM_CHILD_EXITED); |
| 722 | if (ps->quiescing != 2) { /* vs perform_idle_server_maintenance() */ |
| 723 | retained->active_daemons--; |
| 724 | } |
| 725 | retained->total_daemons--; |
| 726 | ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, |
| 727 | "Child %d stopped: pid %d, gen %d, " |
| 728 | "active %d/%d, total %d/%d/%d, quiescing %d", |
| 729 | slot, (int)pid, (int)gen, |
| 730 | retained->active_daemons, active_daemons_limit, |
| 731 | retained->total_daemons, retained->max_daemon_used, |
| 732 | server_limit, ps->quiescing); |
| 733 | ps->not_accepting = 0; |
| 734 | ps->quiescing = 0; |
| 735 | ps->pid = 0; |
| 736 | } |
| 737 | else { |
| 738 | ap_run_child_status(ap_server_conf, pid, gen, -1, MPM_CHILD_EXITED); |
| 739 | } |
| 740 | } |
| 741 | |
| 742 | static void event_note_child_started(int slot, pid_t pid) |
| 743 | { |
no test coverage detected