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.
This commit is contained in:
Jeff Becker 2022-10-27 10:54:43 -04:00
parent a9a2a115bc
commit 9cdfae2e42
No known key found for this signature in database
GPG Key ID: 025C02EE3A092F2D
1 changed files with 5 additions and 2 deletions

View File

@ -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;