From: Bradley Nicholes Date: Wed, 17 Mar 2004 01:03:27 +0000 (+0000) Subject: Add a terminate function that gets called on atexit() so that NetWare has the chance... X-Git-Tag: pre_ajp_proxy~505 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65c9f179999c3d17d67ce0fe08c8ec5d94160b78;p=apache Add a terminate function that gets called on atexit() so that NetWare has the chance to pause the screen to view the output before the screen is destroyed. Submitted by: Guenter Knauf git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103005 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/htdbm.c b/support/htdbm.c index bdf74d8de4..1d59110d15 100644 --- a/support/htdbm.c +++ b/support/htdbm.c @@ -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. */ }