From 48901ef4926e73fc3eb7d4a49c785c4d546c2a51 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Tue, 27 Feb 2001 18:46:05 +0000 Subject: [PATCH] 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 --- server/mpm/threaded/threaded.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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++) { -- 2.47.3