diff options
author | Bradley Nicholes <bnicholes@apache.org> | 2004-03-17 02:03:27 +0100 |
---|---|---|
committer | Bradley Nicholes <bnicholes@apache.org> | 2004-03-17 02:03:27 +0100 |
commit | 65c9f179999c3d17d67ce0fe08c8ec5d94160b78 (patch) | |
tree | e7c596fffacd7eb21c182fba19367dda75e6c8fc /support | |
parent | Replace calls to fprintf() with apr_file_printf() (diff) | |
download | apache2-65c9f179999c3d17d67ce0fe08c8ec5d94160b78.tar.xz apache2-65c9f179999c3d17d67ce0fe08c8ec5d94160b78.zip |
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 <eflash@gmx.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103005 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r-- | support/htdbm.c | 14 |
1 files changed, 10 insertions, 4 deletions
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. */ } |