]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: Add shutdown event log message
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Jul 2011 18:12:42 +0000 (14:12 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 2 Aug 2011 15:00:29 +0000 (08:00 -0700)
Add an explicit message that the shutdown sequence is complete.
This is necessary because during a Windows OS shutdown, the service
is frequently killed prior to the memory mapped file is fully released.

Reviewed-on: http://gerrit.openafs.org/5053
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from e91f16ebb704a431f9731bb39bf9b5621b7f6ad0)

Change-Id: I80685fae2b581171c580b039ae029ca69bea467c
Reviewed-on: http://gerrit.openafs.org/5132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/afsd_eventlog.c
src/WINNT/afsd/afsd_eventmessages.mc
src/WINNT/afsd/afsd_service.c

index 9634337fcfd0d7f73d3a8fd71e1fb7dc2289e9c3..e73179f0dbc4c4ca14061b6962b81d6626e6588f 100644 (file)
@@ -201,6 +201,7 @@ LogEvent(WORD wEventType, DWORD dwEventID, ...)
     case MSG_SERVICE_INCORRECT_VERSIONS:
     case MSG_SERVICE_RUNNING:
     case MSG_SERVICE_STOPPING:
+    case MSG_SERVICE_STOPPED:
     case MSG_SERVICE_ERROR_STOP:
     case MSG_CRYPT_OFF:
     case MSG_CRYPT_ON:
index 7bbc0d35f5decb78e28ab418f4d90a1cf4f21878..c42f748465f81ccc2fe66959e3d59d4fe1669526 100644 (file)
@@ -438,4 +438,12 @@ Language=English
 Busy call channel when communicating with server %1, retrying ...
 .
 
+MessageId=
+Severity=Informational
+Facility=System
+SymbolicName=MSG_SERVICE_STOPPED
+Language=English
+OpenAFS Shutdown Complete.
+.
+
 ;#endif /* __AFSD_EVENTMESSAGES_H_ 1 */
index 847e4b0ae589d4e9ea6ed4adb46e25a152c2ed85..016848c595963263e4f5a9e61942be298b8397d7 100644 (file)
@@ -1502,6 +1502,8 @@ afsd_Main(DWORD argc, LPTSTR *argv)
     /* Remove the ExceptionFilter */
     SetUnhandledExceptionFilter(NULL);
 
+    LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_SERVICE_STOPPED);
+
     if (bRunningAsService) {
         ServiceStatus.dwCurrentState = SERVICE_STOPPED;
         ServiceStatus.dwWin32ExitCode = GlobalStatus ? ERROR_EXCEPTION_IN_SERVICE : NO_ERROR;