version 1.62, 2008/12/16 18:56:54
|
version 1.63, 2009/02/24 10:34:50
|
|
|
CIMStopAllProvidersRequestMessage and | CIMStopAllProvidersRequestMessage and |
CMPILocalProviderManager::_provider_ctrl() method could not unload the | CMPILocalProviderManager::_provider_ctrl() method could not unload the |
provider(s) because of pending requests with the provider. We give grace | provider(s) because of pending requests with the provider. We give grace |
time of (shutdownTimeout - 1) seconds to the unload pending providers |
time of (90% of shutdownTimeout) seconds to the unload pending providers |
to unload gracefully before terminating them forcibly. Note that this | to unload gracefully before terminating them forcibly. Note that this |
happens only when provider is running out-of-process and communication | happens only when provider is running out-of-process and communication |
with CIMServer falied because of pipe read/write failures. | with CIMServer falied because of pipe read/write failures. |
|
|
| |
Uint32 timeoutValue = | Uint32 timeoutValue = |
strtol(configTimeout.getCString(), (char **)0, 10); | strtol(configTimeout.getCString(), (char **)0, 10); |
|
// Calculate 90% of timeout value, minimum 1 second. |
|
timeoutValue = (Uint32)((timeoutValue - 1) * 0.9); |
|
timeoutValue++; |
| |
for (Uint32 waitTime = timeoutValue - 1; waitTime > 0; waitTime--) |
struct timeval startTime; |
|
struct timeval timeNow; |
|
|
|
Time::gettimeofday(&startTime); |
|
|
|
for (;;) |
{ | { |
Boolean unloadPending = false; | Boolean unloadPending = false; |
for (Uint32 j = 0, n = unloadPendingProviders.size(); j < n; ++j) | for (Uint32 j = 0, n = unloadPendingProviders.size(); j < n; ++j) |
|
|
} | } |
} | } |
} | } |
if (!unloadPending) |
// Get the current time and check if it exceeds |
|
// or equals to timeoutValue. |
|
Time::gettimeofday(&timeNow); |
|
if (((Uint32)(timeNow.tv_sec - startTime.tv_sec)) >= timeoutValue |
|
|| !unloadPending) |
{ | { |
break; | break; |
} | } |