From 9cdfae2e42aa22b348c62973fa7cea4f9b9a3fe2 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 27 Oct 2022 10:54:43 -0400 Subject: [PATCH] correct windows service manager behavior. report status to window service manager when we get and iterogate message from the service manager. update comments to reflect these changes. --- daemon/lokinet.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/daemon/lokinet.cpp b/daemon/lokinet.cpp index a618e5aa7..7a20d2742 100644 --- a/daemon/lokinet.cpp +++ b/daemon/lokinet.cpp @@ -647,13 +647,16 @@ SvcCtrlHandler(DWORD dwCtrl) switch (dwCtrl) { case SERVICE_CONTROL_STOP: + // tell servicve we are stopping ReportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 0); - // Signal the service to stop. + // do the actual tear down handle_signal(SIGINT); return; case SERVICE_CONTROL_INTERROGATE: - break; + // report status + SetServiceStatus(SvcStatusHandle, &SvcStatus); + return; default: break;