William A. Rowe, Jr. wrote:
I'm thinking of a scenario where the console *parent only* and on win32
might hold onto the stdin handle.  I'll research and reply.

I'm becoming more certain that without stdout (we *do* launch with stdin
to the console, because it's only deprived from the child) we have
changed the behavior of console services.

Boy, I was off-base.  *READ* the "help start" docs before you go blaming
httpd ;-)

The most suspicious, there is one fewer thread (yup, I'm guessing it's a
cmd.exe monitor thread) when run from start.exe rather than on this
existing console.  It's also possible that our WaitForMultipleObjects
in the parent really needs to be MsgWaitForMultipleObjects.

BINGO.  HTTPD is unwilling to manage the console except when it's doing
its very goofy Win9x-service dance.  You have two choices;

start.exe cmd /c httpd.exe

start.exe /b httpd.exe

The first command gives you a controllable httpd that can be stopped
with ^C / ^BREAK.  The second command starts httpd in the current
console, gives you back the console (although the display of messages
make this confusing) and just like a unix daemon, you _must_ kill it
by-pid (and like unix, httpd doesn't do this.)  Although closing the
console window *does* kill it, ^C / ^BREAK will not.

The behavior of start.exe httpd.exe has definitely not been a design
consideration, and sure isn't worth holding up Apache 2.2.8.  To
whatever degree it "accidentally" worked before, its senseless.

Long and short of things; perhaps we should also evaluate closing stdin
as the unix daemon does, and figure out the mechanics to httpd -k stop
either a service or by logs/httpd.pid, but this is certainly good enough
for release 2.2.8 and 2.0.63.

Bill

Reply via email to