I decided that maybe I would take a different tac that is less
intrusive on other platforms since this is a NetWare problem. If you
look at os/netware/os.h you will see that we had already redefined
exit() to call our pressanykey() function whenever the exit code is
something other than 0. I added a global variable inside of our MPM
that is set when our rewrite_args callback is called from main(). It is
then unset when ap_mpm_run() is finally through all of the
initialization and configuration stages. The thinking behind this is
that if exit() is ever called during the initialization and
configuration of the Apache process, we hold the screen open to display
any error messages or information that has been printed to the screen.
In addition, we also want to hold the screen open if exit() is ever
called after that with an error code (which was the default case
previously). But if Apache exits normally after the initialization and
configuration stage is complete, we want the screen to auto-close. This
way the only files I touch are os/netware/os.h and
server/mpm/netware/mpm_netware.c. I'm not introducing a new #define
that really has no meaning on any other platform other than NetWare.
thanks,
Brad
Brad Nicholes
Senior Software Engineer
Novell, Inc., the leading provider of Net business solutions
http://www.novell.com
>>> [EMAIL PROTECTED] Wednesday, July 24, 2002 3:33:11 PM >>>
On Tue, Jul 23, 2002 at 11:43:03PM +0200, Martin Kraemer wrote:
> Yes. "The unix philosophy".
> You are absolutely right: it IS inconsistent, and should be fixed.
> But rather than changing all exit codes to 1, I would prefer to see
> all these exit codes being changed to EX_OK:
> #define EX_OK 0 /* successful termination */
EXIT_SUCCESS and EXIT_FAILURE is the proper value. These
should be defined by the system/compiler/whatever. -- justin