mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
Fix for #6836 - fb_shutdown() does not wait for self completion in other thread
This commit is contained in:
parent
978e7ef1b0
commit
b380acc47c
@ -3673,15 +3673,6 @@ ISC_STATUS API_ROUTINE isc_unwind_request(ISC_STATUS* userStatus, isc_req_handle
|
|||||||
// Shutdown firebird.
|
// Shutdown firebird.
|
||||||
int API_ROUTINE fb_shutdown(unsigned int timeout, const int reason)
|
int API_ROUTINE fb_shutdown(unsigned int timeout, const int reason)
|
||||||
{
|
{
|
||||||
if (reason == fb_shutrsn_emergency)
|
|
||||||
{
|
|
||||||
shutdownStarted = true;
|
|
||||||
abortShutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shutdownStarted)
|
|
||||||
return FB_SUCCESS;
|
|
||||||
|
|
||||||
StatusVector status(NULL);
|
StatusVector status(NULL);
|
||||||
CheckStatusWrapper statusWrapper(&status);
|
CheckStatusWrapper statusWrapper(&status);
|
||||||
|
|
||||||
@ -6422,6 +6413,10 @@ YService* Dispatcher::attachServiceManager(CheckStatusWrapper* status, const cha
|
|||||||
|
|
||||||
void Dispatcher::shutdown(CheckStatusWrapper* userStatus, unsigned int timeout, const int reason)
|
void Dispatcher::shutdown(CheckStatusWrapper* userStatus, unsigned int timeout, const int reason)
|
||||||
{
|
{
|
||||||
|
// set "process exiting" state
|
||||||
|
if (reason == fb_shutrsn_emergency)
|
||||||
|
abortShutdown();
|
||||||
|
|
||||||
// can't syncronize with already killed threads, just exit
|
// can't syncronize with already killed threads, just exit
|
||||||
if (MasterInterfacePtr()->getProcessExiting())
|
if (MasterInterfacePtr()->getProcessExiting())
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user