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/04/15 06:24:18 UTC
[patches 2.0 & 1.3] src/os/win32/service
Three (sorry, couldn't help myself) fixes to 2.0 and one fix to 1.3:
1) [2.0] Move the space stripping of physical service names
fix up from Apache 1.3.
2) [2.0] #include'ing "ap_mpm.h" fixes up an unresolved symbol.
3) [both] Due to frequent complains of launching Apache as a service,
and the difficulty of shooting down the issue (when Apache is
willing to launch from the command line), the patch to each
module will assure NT first launches TCPIP and AFP (winsock)
in order to assure that Apache launches smoothly at startup.
Notes; the "Tcpip\0Afd\0" is correct, it's a double null terminated list.
Let's wait on depending upon Rpcss until someone documents a universal
requirement... right now it's only needed for dcom remote processes,
and I really don't want to trip that for security unless someone uses
it from their custom module. Everything else, under NT, will load it
when CoInitialize is called, so ISAPI and other executable pages will
hook it in later when their apps are served. 95 does have a problem
loading it except from an STA, but then again, 95 isn't a service yet :-)
Bill
Citations;
Jack Repenning <ja...@informix.com>
http://x34.deja.com/[ST_rn=ps]/getdoc.xp?AN=533605486&CONTEXT=955768080.186908675&hitnum=0
With reference to
http://support.microsoft.com/support/kb/articles/Q197/2/86.ASP
Arunas Salkauskas <arunas@an!m.org>
http://x34.deja.com/[ST_rn=ps]/getdoc.xp?AN=582178803&CONTEXT=955768080.186908675&hitnum=1
[Gee, I -hope- these links work for anyone else, sorry if I'm not clear on citing deja]
TODO: provide a reference to the correct error log file,
or capture the last error and spit it out
to the system error log on service failure.
(sorry, but that's the first place any NT admin
with a brain will look.)
Prevent the console window from closing on failure,
until dismissed with close window or sys shutdown,
and unhide it if necessary (for the next item)...
Oh... and change the title of the console window
to "Apache.exe unexpectedly failed" :-)
Detect 'interacting with desktop' and start with
a toolbar icon, console window hidden, until the
toolbar icon is clicked (unhide console window).
Minimize console will again hide it.
Implement Windows 95/98 as a service
PLEASE: if you can't read the following as text/plain, tell me!
RE: [patches 2.0 & 1.3] htdocs/manual/windows.html for src/os/win32/service
Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> > > > 3) [both] Due to frequent complains of launching Apache as
> > > a service,
> > > > and the difficulty of shooting down the issue (when Apache is
> > > > willing to launch from the command line), the patch to each
> > > > module will assure NT first launches TCPIP and AFP (winsock)
> > > > in order to assure that Apache launches smoothly at startup.
> > > >
As promised... the htdocs patch.
I know you will -hate- it.
Ok, the changes to 1.3 are rather minor but involve quite a few lines.
1) document that WinSock2 is *REQUIRED*
2) eliminate notes about NT 3.x - it isn't Winsock2
3) Reverse start as command line / start as service
THEY NEED TO BE TESTING THE COMMAND LINE FIRST!
4) add service docs, and lots of them
The 2.0 patch is a mess, yes I know it, but we need to overhaul anyway.
1) same as 1.3
2) move compiling out to win_compiling.html
3) clean up formatting and unbalanced tags
4) shorten (most) long lines.
5) I didn't touch the compiling instructions, although I am
working up changes to that new file.
Why 3)? Because if we have to maintain it... we ought to be able
to read it. We will be stuck with the 2.0 file alot longer than
the 1.3 file (at least touching it).
If you want to hold off on doing -anything- in the 2.0 htdocs
tree, that's just fine with me.
The next change is to pull out EVERYTHING service related into
a win_nt_service.html, and we will begin a win_95_service.html
when needed. I will do those two at the same moment.
Will you look at one thing, Bill?
Please see if there is a way to pre-test (-t) the config before
accepting the register service request? combined with my
'keep console window open on error' fix will really help get
these bugs/newsgroup posts cleaned up!!!
Again, my humble appologies that I did so much work to clean it.
Re: [patches 2.0 & 1.3] src/os/win32/service
Posted by Bill Stoddard <st...@raleigh.ibm.com>.
> > From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> > Sent: Saturday, April 15, 2000 12:37 PM
> >
> > > 3) [both] Due to frequent complains of launching Apache as
> > a service,
> > > and the difficulty of shooting down the issue (when Apache is
> > > willing to launch from the command line), the patch to each
> > > module will assure NT first launches TCPIP and AFP (winsock)
> > > in order to assure that Apache launches smoothly at startup.
> > >
> > Cool. I was wondering how to do this.
> >
> > Bill
>
> So was I for the past month and a half. I knew 'how' to do it,
> but didn't really know what we really depended on. I didn't feel
> like breaking ServicePacked NT to find out :-)
I knew about AFP and of course TCP/IP. A few of us here at IBM have written an in-kernel
HTTP engine for NT. We needed to punt cache misses to Apache, which ultimately required us
to completely bypassed AFP in favor of our own home grown light weight socket layer (for
performance reasons). Wish we'd done the work on Linux instead...
Bill
RE: [patches 2.0 & 1.3] src/os/win32/service
Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> Sent: Saturday, April 15, 2000 12:37 PM
>
> > 3) [both] Due to frequent complains of launching Apache as
> a service,
> > and the difficulty of shooting down the issue (when Apache is
> > willing to launch from the command line), the patch to each
> > module will assure NT first launches TCPIP and AFP (winsock)
> > in order to assure that Apache launches smoothly at startup.
> >
> Cool. I was wondering how to do this.
>
> Bill
So was I for the past month and a half. I knew 'how' to do it,
but didn't really know what we really depended on. I didn't feel
like breaking ServicePacked NT to find out :-)
The docs will follow in ten minutes.
Re: [patches 2.0 & 1.3] src/os/win32/service
Posted by Bill Stoddard <st...@raleigh.ibm.com>.
>
> 3) [both] Due to frequent complains of launching Apache as a service,
> and the difficulty of shooting down the issue (when Apache is
> willing to launch from the command line), the patch to each
> module will assure NT first launches TCPIP and AFP (winsock)
> in order to assure that Apache launches smoothly at startup.
>
Cool. I was wondering how to do this.
Bill
RE: [patches 2.0] src/os/win32/service et al
Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: William A. Rowe, Jr. [mailto:wrowe@lnd.com]
> Sent: Friday, April 14, 2000 11:24 PM
>
> Three (sorry, couldn't help myself) fixes to 2.0 and one fix to 1.3:
>
> 1) [2.0] Move the space stripping of physical service names
> fix up from Apache 1.3.
>
> 2) [2.0] #include'ing "ap_mpm.h" fixes up an unresolved symbol.
>
> 3) [both] Due to frequent complains of launching Apache as a service,
> and the difficulty of shooting down the issue (when Apache is
> willing to launch from the command line), the patch to each
> module will assure NT first launches TCPIP and AFP (winsock)
> in order to assure that Apache launches smoothly at startup.
Rework 2.0 patch (sorry :( ) ...
4) Add ap_collapse_spaces (couldn't stand remove myself) to APR.
Even const'd it correctly... Greg. ;-)
Since I'm a C++ guy at heart, I can't stand worthless
post increments either.
(C++ returns C... postdecremented no less)
5) Code is better optimized to avoid double-copies.
6) While adding ap_collapse_spaces, I freaked out when I
looked at the filename from pathname. Sorry, but we
Windows folk -can- use slashes as well!!! (Plus the
occasional drive - pathless name.) Fixed
That's it... it builds, runs, installs and uninstalls cleanly.