bnicholes 01/05/23 09:53:45
Modified: src/os/netware os.c
Log:
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.
Revision Changes Path
1.15 +15 -0 apache-1.3/src/os/netware/os.c
Index: os.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/netware/os.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- os.c 2001/03/30 16:15:46 1.14
+++ os.c 2001/05/23 16:53:38 1.15
@@ -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];
@@ -131,6 +133,19 @@
}
}
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()
|