httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject [Patch 1.3.13] The hold console open patch arrives...
Date Mon, 26 Jun 2000 19:00:30 GMT

  I looked at the two things I hate in the bugs database and on
the newsgroup, and though I've always 
been with Ken 100% on this, I went back and attacked it.

  I realized that we are -not- launching Win9x services using
the RunApache.bat thunk, ever.  So that implies that we really,
really need a real patch.

  Thank you for the macro suggestions, it turned out to be the
only clear solution.  A little variable tweaking and we know
if the exit code is bad.  But there was still a little problem...

  The control_handlers happen too late for a good chunk of the
errors that can arise.  We needed to hook the bad exception
much earlier, in fact right after we try to start an NT service.
We need to keep it open no longer than 30 seconds, in case the
admin is away from the console at the time.

  So attached is a patch that should do just this.  Some extra
exit() codes needed to be cleaned up in the process.  Beat up 
on it if you like, rewrite it if you like, but unless I hear an
objection by Wed at noon, I'll commit then.

  I mentioned the other thing... never telling users about the
NT service failure.  I have a quick solve for that too, possibily.
It's a real hack.  A one message resource file that is nothing
more than the error message "Error: %1" (sucks one string arg) 
that will be called for every stderr event.  (Sorry, but the NT 
event log doesn't take strings, only message codes and a %n style 
string arg list.  We need a single message to force strings down 
the throat of ReportEvent().)

  We will simply pipe stderr from start_service for NT, creating
a message pump thread that lives till stderr is closed.  I'll be
sure the handle is an inheritable one with Dup... and that's about
it.  The messages in the log won't be glamourous, but they will 
work for those launch errors.  That patch arrives Wed when I've
committed the first, and will be committed itself on Friday.

  For 2.0, each gets better... we should be able to do better with
the exit() condition, and should be able to implement syslog: style
logging under NT, complete with 8 messages representing the 
different error levels that can be triggered, and cutting out the
timestamp (which occurs in the event log all on it's own.)  Do I 
care at this moment :?  I think these two fixes will get us by till 
October, and beyond for late adopters.  When things settle and this
has rolled it will be easier to turn my attention back to 2.0.


View raw message