]> granicus.if.org Git - apache/commitdiff
Add a terminate function that gets called on atexit() so that NetWare has the chance...
authorBradley Nicholes <bnicholes@apache.org>
Wed, 17 Mar 2004 01:03:27 +0000 (01:03 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Wed, 17 Mar 2004 01:03:27 +0000 (01:03 +0000)
Submitted by: Guenter Knauf <eflash@gmx.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103005 13f79535-47bb-0310-9956-ffa450edef68

support/htdbm.c

index bdf74d8de4d3c6213c4d191016ff0cc4dde111f3..1d59110d1541efb833f5bc76acc30cfe623078ec 100644 (file)
@@ -105,9 +105,16 @@ struct htdbm_t {
 #define HTDBM_NOFILE 4
 #define HTDBM_STDIN  5
 
+static void terminate(void)
+{
+    apr_terminate();
+#ifdef NETWARE
+    pressanykey();
+#endif
+}
+
 static void htdbm_terminate(htdbm_t *htdbm) 
 {
-    
     if (htdbm->dbm)
         apr_dbm_close(htdbm->dbm);
     htdbm->dbm = NULL;
@@ -254,7 +261,7 @@ static apr_status_t htdbm_list(htdbm_t *htdbm)
         fprintf(stderr, "    %-32s", kb);
         strncpy(rec, val.dptr, val.dsize);
         rec[val.dsize] = '\0';
-        cmnt = strchr(rec, ';');
+        cmnt = strchr(rec, ':');
         if (cmnt)
             fprintf(stderr, cmnt + 1);
         fprintf(stderr, "\n");
@@ -387,7 +394,7 @@ int main(int argc, const char * const argv[])
     int args_left = 2;
 
     apr_app_initialize(&argc, &argv, NULL);
-    atexit(apr_terminate);
+    atexit(terminate);
 
     if ((rv = htdbm_init(&pool, &h)) != APR_SUCCESS) {
         fprintf(stderr, "Unable to initialize htdbm terminating!\n");
@@ -569,7 +576,6 @@ int main(int argc, const char * const argv[])
         }
     }
     htdbm_terminate(h);
-    apr_terminate();
     
     return 0; /* Suppress compiler warning. */
 }