httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Moon" <>
Subject Re: Win32 Process Window Termination
Date Tue, 16 May 2000 16:28:55 GMT
It seems that the easiest way to go would be to make the app a window-less
gui app.  I hope that makes sense.  In windows you can have an app that is
not console but at the same time does not have a window.  Now, I do not know
the code inside and out, but it seems that should work.

I believe the console windows are owned by a process named
C:\WINDOWS\SYSTEM\conagent.exe.  If you look at the properties of a console
window in Win98 you will see that they all show that as the program that is
running and not the process itself.  Kind of strange.  Now, I do not have
2.0 working on 98 yet, but for 1.3, I know that winoldap is fired up when
you start apache.  Not sure why.  Welcome to MS.

Brian Moon
----------------------------------------------------------------------, Inc.
Makers of dealnews, dealmac |

----- Original Message -----
From: "William A. Rowe, Jr." <>
To: <>
Sent: Tuesday, May 16, 2000 10:45 AM
Subject: Win32 Process Window Termination

> Win32 Folks;
>   [those easily annoyed by Wintel can ignore this thread -
> it's another good example of the M$ boneheaded cr*p :-]
>   I've attacked and substantially conquered the process termination
> issues under WinNT.  The code I'll be posting handles all manners of
> ending the server, including Ctrl+C, Ctrl+Break, the close window
> button and system shutdown.  None of the following applies to WinNT...
>   Using JJK's submission as a base, I've also conquered starting
> Apache as a service under Win9x.  When not as-service, it also handles
> the Ctrl+C and Ctrl+Break situations well.  When as-service, I've tweaked
> the code to hide, rather than destroy, the console window.  But I don't
> care for the 'hidden window' approach if I can avoid it... since the
> issue goes hand in hand with the following not-as-service issue:
>   Win9x uses a different Console wrapper, the window class tty rather
> than the NT ConsoleWindowClass, and has no provision to send the various
> shutdown and close events to the executable.  Kermit 5.0, several other
> compatibility thunks and other console apps seem to share the same issues.
>   I've tried (unsuccessfully) to handle these events by subclassing the
> tty window.  This doesn't succeed, but indicates no error code upon
> failure (other than returning 0 from SetWindowLong, which is unexpected,
> since the WNDPROC does have a value.)  I'm assuming that another process
> owns this tty window, even though it appears to be our own (per spy).
>   I've got only a few other options, none of which I like.  The obvious
> is to create a hidden window (I -hate- this), implement a third party
> console emulator (yes, a few exist), change to a GUI, poll via the VM
> calls (not calls, but int 2F!?!) etc, etc, etc.
>   If anyone has a good suggestion to offer, that does not break the
> common code base (meaning, don't start in terms of the Win32 rewrite!)
> I'm all ears.
> Bill

View raw message