mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 07:51:00 +00:00
prevent-crash-at-shutdown-20040320
The Power Management Exit routine was instructing the thread to terminate but was not waiting for the conclusion of the operation before returning control to the caller. This allows the service to pass control to the Service Manager before cleanup was properly completed.
This commit is contained in:
parent
aaed9b1a5a
commit
e3b52b0bc6
@ -341,7 +341,6 @@ afsd_ServiceFlushVolumesThreadProc(LPVOID lpParam)
|
||||
case WAIT_OBJECT_0:
|
||||
// termination signaled
|
||||
RevertToSelf();
|
||||
Sleep(500);
|
||||
ExitThread(0);
|
||||
break;
|
||||
|
||||
@ -488,6 +487,7 @@ PowerNotificationThreadExit()
|
||||
if (gThreadHandle)
|
||||
{
|
||||
SetEvent(gThreadInfo.hEventTerminate);
|
||||
WaitForSingleObject(gThreadHandle, INFINITE);
|
||||
CloseHandle(gThreadHandle);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user