#include <screen.h>
+extern int hold_screen_on_exit; /* Indicates whether the screen should be held open on exit*/
+
#define CASE_BLIND_FILESYSTEM
#define NO_WRITEV
#define APACHE_MPM_DIR "server/mpm/netware" /* generated on unix */
#define getpid NXThreadGetId
-#define exit(s) if(s){pressanykey();apr_terminate();}exit(s);
+#define exit(s) if(s||hold_screen_on_exit){pressanykey();apr_terminate();}exit(s);
#endif /* ! APACHE_OS_H */
/* *Non*-shared http_main globals... */
+int hold_screen_on_exit = 0; /* Indicates whether the screen should be held open */
+
static fd_set listenfds;
static int listenmaxfd;
startup_workers(ap_threads_to_start);
+ /* Allow the Apache screen to be closed normally on exit()*/
+ hold_screen_on_exit = 0;
+
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
"%s configured -- resuming normal operations",
ap_get_server_version());
atexit (mpm_term);
InstallConsoleHandler();
+ /* Make sure to hold the Apache screen open if exit() is called */
+ hold_screen_on_exit = 1;
+
/* Rewrite process->argv[];
*
* add default -d serverroot from the path of this executable