Browse Source

Ignore INTERROGATE control.

NSSM periodically logs that it received an unhandled INTERROGATE
control.  The control is sent by the system to request an update of the
service's status but NSSM always keeps the status up-to-date so no
action is needed on receipt of the control.

Rather than fill the logs with instances of such a message, NSSM will
now simply ignore the INTERROGATE control silently.
Iain Patterson 11 years ago
parent
commit
5b00b82065
2 changed files with 8 additions and 0 deletions
  1. 4 0
      ChangeLog.txt
  2. 4 0
      service.cpp

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+Changes since 2.16
+-----------------
+  * Silently ignore INTERROGATE control.
+
 Changes since 2.15
 -----------------
   * Fixed case where NSSM could kill unrelated processes when

+ 4 - 0
service.cpp

@@ -319,6 +319,10 @@ void log_service_control(char *service_name, unsigned long control, bool handled
 /* Service control handler */
 unsigned long WINAPI service_control_handler(unsigned long control, unsigned long event, void *data, void *context) {
   switch (control) {
+    case SERVICE_CONTROL_INTERROGATE:
+      /* We always keep the service status up-to-date so this is a no-op. */
+      return NO_ERROR;
+
     case SERVICE_CONTROL_SHUTDOWN:
     case SERVICE_CONTROL_STOP:
       log_service_control(service_name, control, true);