httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <>
Subject Re: Command line argument inconsistency...
Date Tue, 23 Jul 2002 22:07:35 GMT
   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. :)


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
> it displays the help screen and then calls
> 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.

<>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

View raw message