httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <>
Subject Re: cvs commit: apache-2.0/src/os/win32 main_win32.c
Date Fri, 17 Dec 1999 22:12:08 GMT
I don't think this assumption is as bad as it first appears -for Windows-.
I talked to Ken C. about it and he agrees. apachectl makes a similar
assumption about the location of the PID file. However, it is easy to change
apachectl, it is not easy to change apache.exe.

On the larger topic of keeping the windows cruft out of http_main.c... I
have pursued this main_win32 project precisely because most of the group
wanted to keep the Windows code out of http_main.c. I somewhat agree with
this direction, as long at it does not significantly impact the
maintainability and reliability of the Windows port.  I've made good
progress, but I'm not convinced it is ultimately the right thing to do. Take
a look at what I've done (yes it has warts) and give me some feedback.

Here are the alternatives I've though of:
Option 1 - Assume the relative location of the pid file is constant (what
I've done)
It's simple and will probably cover 99.9% (if not more) of the typical
windows users (speak up out there if you are an Apache for Windows user and
you disagree.)

Option 2 - Read the config file in apache.exe
I have this working, but I'm not convinced the ability to put the pid file
anywhere is worth writing ugly error prone code to do so

Option 3 - Move all this Windows shit back to http_main.c

Option 4 - Require the used to pass in a PID in addition to the
start/restart signal
E.g., apache -k restart 123456. Only problem is it is difficult to know
which is the parent and which is the child.

Option 5 - Do something goofy with the registry
Don't like this at all.

Option 6 - Pass the -k options to the Windows MPM via environment variables
and handle this directly in the MPM

All of these options have their strengths and weaknesses.


----- Original Message -----
From: Ryan Bloom <>
To: <>
Cc: <>
Sent: Friday, December 17, 1999 5:34 PM
Subject: Re: cvs commit: apache-2.0/src/os/win32 main_win32.c

> >   Windows:
> >   Some more work to properly handle -k restart,shutdown. I have made a
> >   assumption that the relative name of the server pidfile is always
> >   This saves the error prone effort of reading the config file in
apache.exe (as
> >   opposed to ApacheCore.dll). I am really working hard to keep Windows
> >   junk out of http_main.c.
> I disagree with this assumption.  If somebody wants to change where the
> pidfile is stored, then we have to be able to deal with it.  If that means
> putting some Windows specific stuff in http_main, then so be it.  There
> are other ways to do this as well (I need to think them through more, and
> do some more research about Windows before I post about them).  I am -1
> for this patch, unless it is a stop-gap solution so we can get 2.0 working
> on Windows until we fix this the right way.
> Ryan

View raw message