Gentlefolk,
on the Apache side we ran into a headache on Win2K. Windows services introduced
a SHUTDOWN event with a new signal. Unfortuantely, they did _not_ continue to
support the STOP event from NT. This patch teaches the jk_nt_service to solicit
and respect the SHUTDOWN event as well as the old STOP event.
Your,
Bill
Index: src/native/mod_jk/nt_service/jk_nt_service.c
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat/src/native/mod_jk/nt_service/jk_nt_service.c,v
retrieving revision 1.2
diff -u -r1.2 jk_nt_service.c
--- src/native/mod_jk/nt_service/jk_nt_service.c 2000/11/19 04:15:13 1.2
+++ src/native/mod_jk/nt_service/jk_nt_service.c 2001/04/24 04:33:25
@@ -248,6 +248,7 @@
/*
* Stop the service.
*/
+ case SERVICE_CONTROL_SHUTDOWN:
case SERVICE_CONTROL_STOP:
ssStatus.dwCurrentState = SERVICE_STOP_PENDING;
stop_jk_service();
@@ -281,7 +282,8 @@
if(dwCurrentState == SERVICE_START_PENDING) {
ssStatus.dwControlsAccepted = 0;
} else {
- ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
+ ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP
+ | SERVICE_ACCEPT_SHUTDOWN;
}
ssStatus.dwCurrentState = dwCurrentState;