fails. I'll be making some changes to apr_proc_detach, and it will be
nice to be able to report runtime errors.
Tested on worker but the code changes are identical on other MPMs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93069
13f79535-47bb-0310-9956-
ffa450edef68
{
static int restart_num = 0;
int no_detach, debug;
+ apr_status_t rv;
debug = ap_exists_config_define("DEBUG");
if (restart_num++ == 1) {
is_graceful = 0;
- if (!one_process && !no_detach)
- apr_proc_detach();
+ if (!one_process && !no_detach) {
+ rv = apr_proc_detach();
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
+ "apr_proc_detach failed");
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
+ }
server_pid = getpid();
}
int i;
int tmp_server_limit = DEFAULT_SERVER_LIMIT;
int tmp_thread_limit = DEFAULT_THREAD_LIMIT;
+ apr_status_t rv;
debug = ap_exists_config_define("DEBUG");
is_graceful = 0;
if (!one_process && !no_detach) {
- apr_proc_detach();
+ rv = apr_proc_detach();
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
+ "apr_proc_detach failed");
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
}
my_pid = getpid();
int i;
int tmp_server_limit = DEFAULT_SERVER_LIMIT;
int tmp_thread_limit = DEFAULT_THREAD_LIMIT;
+ apr_status_t rv;
debug = ap_exists_config_define("DEBUG");
is_graceful = 0;
if (!one_process && !no_detach) {
- apr_proc_detach();
+ rv = apr_proc_detach();
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
+ "apr_proc_detach failed");
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
}
my_pid = getpid();
{
static int restart_num = 0;
int no_detach, debug;
+ apr_status_t rv;
debug = ap_exists_config_define("DEBUG");
if (restart_num++ == 1) {
is_graceful = 0;
- if (!one_process && !no_detach) {
- apr_proc_detach();
- }
+ if (!one_process && !no_detach) {
+ rv = apr_proc_detach();
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
+ "apr_proc_detach failed");
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
+ }
parent_pid = ap_my_pid = getpid();
}
}
static int worker_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
- apr_pool_t *ptemp)
+ apr_pool_t *ptemp)
{
static int restart_num = 0;
int no_detach, debug;
ap_directive_t *pdir;
ap_directive_t *max_clients = NULL;
+ apr_status_t rv;
/* make sure that "ThreadsPerChild" gets set before "MaxClients" */
for (pdir = ap_conftree; pdir != NULL; pdir = pdir->next) {
is_graceful = 0;
if (!one_process && !no_detach) {
- apr_proc_detach();
+ rv = apr_proc_detach();
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
+ "apr_proc_detach failed");
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
}
parent_pid = ap_my_pid = getpid();
}