]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Added a check to make sure that Apache is starting in a clean
authorBradley Nicholes <bnicholes@apache.org>
Wed, 23 May 2001 16:53:38 +0000 (16:53 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Wed, 23 May 2001 16:53:38 +0000 (16:53 +0000)
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

src/os/netware/os.c

index 06785dd9498700c904d1332e5265a09064e4b8b2..73c01a16bbaa9f19e360cef90e34f58465884fde 100644 (file)
@@ -58,6 +58,8 @@
 
 #include "httpd.h"
 #include "ap_config.h"
+#include "http_config.h"
+#include "http_log.h"
 #include <dirent.h>
 
 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);