From: Iain Patterson Date: Mon, 3 Dec 2012 18:13:02 +0000 (-0800) Subject: Ignore INTERROGATE control. X-Git-Tag: v2.17~18 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=5b00b82065af2dd87facc881f6a430b0050dfc3f;p=nssm.git 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. --- diff --git a/ChangeLog.txt b/ChangeLog.txt index 26ed909..525a3d8 100644 --- a/ChangeLog.txt +++ b/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 diff --git a/service.cpp b/service.cpp index 81e46ef..d4d023b 100644 --- a/service.cpp +++ b/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);