From: Bradley Nicholes Date: Wed, 13 Nov 2002 21:14:02 +0000 (+0000) Subject: Don't hold the Apache screen open when it exits with an error if all of the error X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c58d8f4b052f0737dd66835e1b32eb822a05baf1;p=apache Don't hold the Apache screen open when it exits with an error if all of the error messages are going to a file anyway. In other words, don't hold the screen open if the -E command line parameter is used. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97507 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build/nw_export.inc b/build/nw_export.inc index cb3e3c4776..77522ee0c2 100644 --- a/build/nw_export.inc +++ b/build/nw_export.inc @@ -13,6 +13,7 @@ #define AP_CORE_DECLARE_NONSTD AP_CORE_DECLARE_NONSTD #define AP_DECLARE_HOOK AP_DECLARE_HOOK #define AP_DECLARE_DATA AP_DECLARE_DATA +#undef APACHE_OS_H #include "httpd.h" diff --git a/os/netware/os.h b/os/netware/os.h index beec1b6cc4..c60c239269 100644 --- a/os/netware/os.h +++ b/os/netware/os.h @@ -65,7 +65,7 @@ #include -extern int hold_screen_on_exit; /* Indicates whether the screen should be held open on exit*/ +AP_DECLARE_DATA extern int hold_screen_on_exit; /* Indicates whether the screen should be held open on exit*/ #define CASE_BLIND_FILESYSTEM #define NO_WRITEV @@ -73,6 +73,10 @@ extern int hold_screen_on_exit; /* Indicates whether the screen should be held o #define APACHE_MPM_DIR "server/mpm/netware" /* generated on unix */ #define getpid NXThreadGetId -#define exit(s) {if(s||hold_screen_on_exit){pressanykey();}apr_terminate();exit(s);} + +/* Hold the screen open if there is an exit code and the hold_screen_on_exit flag >= 0 or the + hold_screen_on_exit > 0. If the hold_screen_on_exit flag is < 0 then close the screen no + matter what the exit code is. */ +#define exit(s) {if((s||hold_screen_on_exit)&&(hold_screen_on_exit>=0)){pressanykey();}apr_terminate();exit(s);} #endif /* ! APACHE_OS_H */ diff --git a/server/mpm/netware/mpm_netware.c b/server/mpm/netware/mpm_netware.c index a911909bbd..6bfff25532 100644 --- a/server/mpm/netware/mpm_netware.c +++ b/server/mpm/netware/mpm_netware.c @@ -1054,6 +1054,9 @@ void netware_rewrite_args(process_rec *process) apr_getopt_init(&opt, process->pool, process->argc, (char**) process->argv); while (apr_getopt(opt, AP_SERVER_BASEARGS, optbuf + 1, &opt_arg) == APR_SUCCESS) { switch (optbuf[1]) { + case 'E': + /* Don't need to hold the screen open if the output is going to a file */ + hold_screen_on_exit = -1; default: *(const char **)apr_array_push(mpm_new_argv) = apr_pstrdup(process->pool, optbuf);