From: Jeff Trawick Date: Tue, 27 Feb 2001 18:46:05 +0000 (+0000) Subject: trap a couple of initialization errors related to the signal thread X-Git-Tag: 2.0.14~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3da2f7a854d8ecaaff580dc7d69ceae0ed77078;p=thirdparty%2Fapache%2Fhttpd.git trap a couple of initialization errors related to the signal thread git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88370 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/threaded/threaded.c b/server/mpm/threaded/threaded.c index 174a3832949..ecdf8929a34 100644 --- a/server/mpm/threaded/threaded.c +++ b/server/mpm/threaded/threaded.c @@ -624,7 +624,12 @@ static void child_main(int child_num_arg) /*done with init critical section */ - apr_setup_signal_thread(); + rv = apr_setup_signal_thread(); + if (rv != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, + "Couldn't initialize signal thread"); + clean_child_exit(APEXIT_CHILDFATAL); + } requests_this_child = ap_max_requests_per_child; @@ -647,7 +652,12 @@ static void child_main(int child_num_arg) apr_threadattr_create(&thread_attr, pchild); apr_threadattr_detach_set(thread_attr); - apr_create_signal_thread(&thread, thread_attr, check_signal, pchild); + rv = apr_create_signal_thread(&thread, thread_attr, check_signal, pchild); + if (rv != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, + "Couldn't create signal thread"); + clean_child_exit(APEXIT_CHILDFATAL); + } for (i=0; i < ap_threads_per_child - 1; i++) {