httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Please Review: [1.3.13 patch] Win32 Hold Console Open, Log stderr to Event Log, and fix Child stdin Pipe
Date Wed, 28 Jun 2000 01:21:23 GMT

  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.



View raw message