ret = apr_poll(pollset, num_listensocks, &n, -1);
if (ret != APR_SUCCESS) {
if (APR_STATUS_IS_EINTR(ret)) {
+ if (one_process && shutdown_pending) {
+ return;
+ }
continue;
}
/* Single Unix documents select as returning errnos
/* resource shortage or should-not-occur occured */
clean_child_exit(1);
}
+ if (APR_STATUS_IS_EINTR(status) && one_process && shutdown_pending) {
+ return;
+ }
}
SAFE_ACCEPT(accept_mutex_off()); /* unlock after "accept" */
}
if (one_process) {
- apr_signal(SIGHUP, just_die);
+ apr_signal(SIGHUP, sig_term);
/* Don't catch AP_SIG_GRACEFUL in ONE_PROCESS mode :) */
- apr_signal(SIGINT, just_die);
+ apr_signal(SIGINT, sig_term);
#ifdef SIGQUIT
apr_signal(SIGQUIT, SIG_DFL);
#endif
- apr_signal(SIGTERM, just_die);
+ apr_signal(SIGTERM, sig_term);
child_main(slot);
+ return 0;
}
(void) ap_update_child_status_from_indexes(slot, 0, SERVER_STARTING,
if (one_process) {
AP_MONCONTROL(1);
+ make_child(ap_server_conf, 0);
}
-
+ else {
if (ap_daemons_max_free < ap_daemons_min_free + 1) /* Don't thrash... */
ap_daemons_max_free = ap_daemons_min_free + 1;
sleep(1);
#endif /*TPF */
}
+ } /* one_process */
if (shutdown_pending) {
/* Time to gracefully shut down: