From 705241efee4119b0f5c089771e5384a8a0dc9d66 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 8 Dec 2003 04:01:20 +0000 Subject: [PATCH] set-service-error-condition-afsd-20031207 TICKET 2619 If the service crashes unexpectedly (eg, when the network adapter list changes) we should return an error code so that system policy can be used to determine if the service should be automatically restarted. When there is an error GlobalStatus gets set to a non-zero value. If GlobalStatus is set, we will return ERROR_EXCEPTION_IN_SERVICE to the Service Manager. --- src/WINNT/afsd/afsd_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WINNT/afsd/afsd_service.c b/src/WINNT/afsd/afsd_service.c index 4946eb8..3e491b4 100644 --- a/src/WINNT/afsd/afsd_service.c +++ b/src/WINNT/afsd/afsd_service.c @@ -334,7 +334,7 @@ void afsd_Main() } ServiceStatus.dwCurrentState = SERVICE_STOPPED; - ServiceStatus.dwWin32ExitCode = NO_ERROR; + ServiceStatus.dwWin32ExitCode = GlobalStatus ? ERROR_EXCEPTION_IN_SERVICE : NO_ERROR; ServiceStatus.dwCheckPoint = 0; ServiceStatus.dwWaitHint = 0; ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP; -- 1.9.4