From: Bradley Nicholes Date: Wed, 23 May 2001 16:53:38 +0000 (+0000) Subject: Added a check to make sure that Apache is starting in a clean X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=335854dd72b47c2722f4b0afbccccdad98e98719;p=thirdparty%2Fapache%2Fhttpd.git Added a check to make sure that Apache is starting in a clean environment. This protects against ill behaved modules that exit the web server rudely leaving ApacheC.nlm in an unknown state. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@89223 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/os/netware/os.c b/src/os/netware/os.c index 06785dd9498..73c01a16bba 100644 --- a/src/os/netware/os.c +++ b/src/os/netware/os.c @@ -58,6 +58,8 @@ #include "httpd.h" #include "ap_config.h" +#include "http_config.h" +#include "http_log.h" #include extern char ap_server_root[MAX_STRING_LEN]; @@ -133,6 +135,19 @@ char *bslash2slash(char* str) return str; } +void check_clean_load(module *top_module) +{ + if (top_module != NULL) { + module *m; + + ap_log_error(APLOG_MARK, APLOG_CRIT, NULL, + "abnormal shutdown detected, performing a clean shutdown: please restart apache"); + for (m = top_module; m; m = m->next) + ap_os_dso_unload((ap_os_dso_handle_t)m->dynamic_load_handle); + exit(1); + } +} + void init_name_space() { UnAugmentAsterisk(TRUE);