You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2002/11/13 22:14:02 UTC
cvs commit: httpd-2.0/server/mpm/netware mpm_netware.c
bnicholes 2002/11/13 13:14:02
Modified: os/netware os.h
build nw_export.inc
server/mpm/netware mpm_netware.c
Log:
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 <filename> command line parameter is used.
Revision Changes Path
1.6 +6 -2 httpd-2.0/os/netware/os.h
Index: os.h
===================================================================
RCS file: /home/cvs/httpd-2.0/os/netware/os.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- os.h 3 Sep 2002 22:00:36 -0000 1.5
+++ os.h 13 Nov 2002 21:14:02 -0000 1.6
@@ -65,7 +65,7 @@
#include <screen.h>
-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 @@
#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 */
1.4 +1 -0 httpd-2.0/build/nw_export.inc
Index: nw_export.inc
===================================================================
RCS file: /home/cvs/httpd-2.0/build/nw_export.inc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nw_export.inc 20 Sep 2002 15:28:13 -0000 1.3
+++ nw_export.inc 13 Nov 2002 21:14:02 -0000 1.4
@@ -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"
1.62 +3 -0 httpd-2.0/server/mpm/netware/mpm_netware.c
Index: mpm_netware.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/netware/mpm_netware.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- mpm_netware.c 14 Oct 2002 18:07:15 -0000 1.61
+++ mpm_netware.c 13 Nov 2002 21:14:02 -0000 1.62
@@ -1054,6 +1054,9 @@
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);