You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@lnd.com> on 2000/06/28 03:21:23 UTC

Please Review: [1.3.13 patch] Win32 Hold Console Open, Log stderr to Event Log, and fix Child stdin Pipe

So,

  This is the patch I will apply at noon tommorow if I have
sufficient votes.  I'm not taking it on myself to decide
"we should do this", I'm simply going to offer the patch
since they are 'features', not fixes.  I know a -few- of you
would rather see my attention directed at 2.0 - your review
of this patch will help make that happen.

  First it fixes what I -BELIEVE- is a bug in http_main
child spawning that keeps the pipe open when it shouldn't be.
Since the parent end of the pipe is inheritable, it doesn't
clamp down when the parent dies an unexpected death.

  The patch keeps the Win32 user's console open for up to
30 seconds so they can read the silly error message, or
they can press <ESC> or double click on the window.  It does
this with a MACRO WRAPPER over exit() - so careful inspection
is well advised :)

  The patch reports service startup errors for WinNT in the
Application event log.  The code to reroute stderr is 
bare-butt ugly, but I could think of no other way to get
out of the buffered nightmare we are in (this is also why
things never hit the logs, of course.  fflush() won't even
do what it says it does.)  If someone can get it running
and make that fragment a little more ellegant, be my guest.

  The nice thing, we cheat.  No message file in 1.3.13 - we
just steal the netmsg.dll standard %1 %2 %3 %4 %5 %6 %7 %8 %9
message for what we need.  2.0 will have a message file, I
expect, to break out all the log conditions if the WinNT user
chooses syslog for output.

  That is all.  Time to port forward to 2.0, after a good nap.

Bill


  

RE: Please Review: [1.3.13 patch] Win32 Hold Console Open, Log stderr to Event Log, and fix Child stdin Pipe

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: TOKILEY@aol.com [mailto:TOKILEY@aol.com]
> Sent: Wednesday, June 28, 2000 3:43 AM
> To: new-httpd@apache.org
> Subject: Re: Complete source for Apache MSVC/Borland IconBar APP
> 
> In a message dated 00-06-28 04:08:40 EDT, you William Rowe writes...
> 
> >  Speaking of it being borland-ready, take a look at my patch for NT event
> >  logging of this evening... that one bit of stdio crud is probably MSVC
> >  specific, if you care to pass on a fix for Borland (or simply make it
> >  generic, but I don't think you can do so and keep it as immediate-commit
> >  at the same time.)  The MS clib looks at stdxxx and decides they are not
> >  a tty, you are then screwed.  I needed the fdopen to force the mode back
> >  to unbuffered.
> 
> Roger that. I was looking at that and everything that piece of kit is
> actually trying to do and I think there is an easier way but it's
> going to involve some un-documented calls to pop the messages
> into the event logs. Is that too scary?

Probably... if you can post the fixup for stderr redirection under Borland,
feel free to submit a second patch using undoc calls, but they are unlikely
to be used.  If it's an undocumented feature to trip stderr processing in
the Borland VC stdc lib, I'd understand, but the event log is well documented
and will work fine as is.

RE: Please Review: [1.3.13 patch] Win32 Hold Console Open, Log stderr to Event Log, and fix Child stdin Pipe

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: William A. Rowe, Jr. [mailto:wrowe@lnd.com]
> Sent: Tuesday, June 27, 2000 8:21 PM
>
>   This is the patch I will apply at noon tommorow if I have
> sufficient votes.  I'm not taking it on myself to decide
> "we should do this", I'm simply going to offer the patch
> since they are 'features', not fixes.  I know a -few- of you
> would rather see my attention directed at 2.0 - your review
> of this patch will help make that happen.

But please ignore the Apache.dsp - you can see I was 'about' to
create our own .mc message file, and threw that away.  Apache.dsp
will be reverted in about 5 minutes :)

Bill