httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Burry" <>
Subject Re: Command line argument inconsistency...
Date Wed, 24 Jul 2002 03:48:27 GMT
What about using something else external to apache to detect output under
netware?  Is it possible to pipe the output to something else that detects
if there is any, and holds the window open only if there is?  Wouldn't that
solve the problem in a more consistent way than altering the return codes?
In my opinion, return codes should just be consistent as to whether there is
an error or not (and perhaps if so, what kind of error), and not indicate
whether there's output or not, since we could simply check the output itself
for that info.


----- Original Message -----
From: "Brad Nicholes" <>
To: <>; <>
Sent: Tuesday, July 23, 2002 3:07 PM
Subject: Re: Command line argument inconsistency...

>    I understand and that is the reason why I asked.  As far as the
> return value is concerned on NetWare, it doesn't matter.  But I need
> some indication that the screen needs to stay open so that the user can
> see what happened.  If an error occurs and an error message is printed
> to the screen, the exit code will most likely not be 0, so we are OK.
> And I agree that returning an error code on a normal exit such as with
> -h or -v command line arguments would also be inconsistent.  But I have
> no way of telling the difference between a normal exit (ie. Apache
> exited normally on a shutdown) or a normal exit with messages (ie. -v or
> -h ).  Furthermore, this is all in common crossplatform code so I can't
> really #ifdef it for NetWare and fix the problem.  So I'm stuck unless I
> can come up with a better idea.  BTW, I'm open to ideas. :)
> thanks,
> Brad
> Brad Nicholes
> Senior Software Engineer
> Novell, Inc., the leading provider of Net business solutions
> >>> Tuesday, July 23, 2002 3:43:03
> PM >>>
> On Tue, Jul 23, 2002 at 02:03:44PM -0600, Brad Nicholes wrote:
> > [...]to be inconsistent.  For example, if I start Apache2 with a -h
> option,
> > it displays the help screen and then calls
> destroy_and_exit_process()
> > with an exit code of 1.
> > [...] Is there any reason why we can't switch the -v, -V,
> > -l, -L options to exit with a 1 instead of a 0 like the -h option?
> 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 */
> because all of them indicate that the request for information has been
> processed successfully.
> In comparison, on unix, the return code of "ls -l" is always zero
> if all files could be listed successfully, "even if the command
> produced output via stdout".
> If Netware has a problem with anything being displayed, IMHO it is
> Netware's problem to fix it.
> Sorry, I don't want to sound harsh, but also I do not intend to
> pervert the Unix philosophy here.
>    Martin
> --
> <>         |     Fujitsu Siemens
> Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

View raw message