This change allows Apache on NetWare to shutdown cleanly in an error condition.
Apache on NetWare has to import the module structure symbol for each loaded module
during startup. Under normal shutdown, these symbols are unloaded and Apache shuts
down cleanly. But in an error condition such as an error while reading the .CONF
file, these symbols are not removed and therefore Apache does not shutdown cleanly.
This causes a critical error on the server when attempting to reload Apache.
--- d:\tempapache\apache-1.3\src\modules\standard\mod_so.c Mon Jan 15 10:05:49
2001
+++ d:\projects\1.3.x\src\modules\standard\mod_so.c Wed Feb 21 13:32:13 2001
@@ -179,6 +179,9 @@
ap_remove_loaded_module(modi->modp);
/* unload the module space itself */
+#ifdef NETWARE
+ ap_os_dso_unsym((ap_os_dso_handle_t)modi->modp->dynamic_load_handle, modi->name);
+#endif
ap_os_dso_unload((ap_os_dso_handle_t)modi->modp->dynamic_load_handle);
/* destroy the module information */
--- d:\tempapache\apache-1.3\src\os\netware\os.c Mon Feb 12 00:51:03 2001
+++ d:\projects\1.3.x\src\os\netware\os.c Wed Feb 21 13:48:12 2001
@@ -97,6 +97,11 @@
return ImportSymbol((int)GetNLMHandle(), (char *)symname);
}
+void ap_os_dso_unsym(void *handle, const char *symname)
+{
+ UnimportSymbol((int)GetNLMHandle(), (char *)symname);
+}
+
const char *ap_os_dso_error(void)
{
return NULL;
--- d:\tempapache\apache-1.3\src\os\netware\os.h Thu Jan 25 19:12:50 2001
+++ d:\projects\1.3.x\src\os\netware\os.h Wed Feb 21 13:32:08 2001
@@ -147,6 +147,7 @@
void *ap_os_dso_load(const char *);
void ap_os_dso_unload(void *);
void *ap_os_dso_sym(void *, const char *);
+void ap_os_dso_unsym(void *handle, const char *symname);
const char *ap_os_dso_error(void);
char *remove_filename(char*);
char *bslash2slash(char*);
--- d:\tempapache\apache-1.3\src\changes Tue Feb 20 17:36:35 2001
+++ d:\projects\1.3.x\src\changes Thu Feb 22 08:38:45 2001
@@ -1,5 +1,12 @@
Changes with Apache 1.3.19
+ *) Added a new API for NetWare to allow Apache the chance to unimport
+ module symbols before it shuts down.
+ void ap_os_dso_unsym(void *handle, const char *symname)
+ This is necessary so that Apache on NetWare can shutdown cleanly
+ in an error condition such as a failure while reading the .CONF
+ file. [Brad Nicholes <[EMAIL PROTECTED]>]
+
*) Fixed system shutdown on Windows 2000 to assure that the modules have
an opportunity to clean up. Note there is a _very_ limited amount of
time in which to execute all cleanups [see MSKB Q146092] so all of