mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 07:23:03 +01:00
Fixed #7295: Unexpected message 'Error reading data from the connection' when fbtracemgr is closed using ctrl-C
(cherry picked from commit b7d42e20fa
)
This commit is contained in:
parent
852e8e9568
commit
1e3e881435
@ -61,6 +61,8 @@ public:
|
|||||||
virtual void setActive(ULONG id, bool active);
|
virtual void setActive(ULONG id, bool active);
|
||||||
virtual void listSessions();
|
virtual void listSessions();
|
||||||
|
|
||||||
|
os_utils::CtrlCHandler ctrlCHandler;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void runService(size_t spbSize, const UCHAR* spb);
|
void runService(size_t spbSize, const UCHAR* spb);
|
||||||
|
|
||||||
@ -202,8 +204,6 @@ void TraceSvcUtil::listSessions()
|
|||||||
|
|
||||||
void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
|
void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
|
||||||
{
|
{
|
||||||
os_utils::CtrlCHandler ctrlCHandler;
|
|
||||||
|
|
||||||
ISC_STATUS_ARRAY status;
|
ISC_STATUS_ARRAY status;
|
||||||
|
|
||||||
if (isc_service_start(status, &m_svcHandle, 0,
|
if (isc_service_start(status, &m_svcHandle, 0,
|
||||||
@ -324,20 +324,23 @@ int CLIB_ROUTINE main(int argc, char* argv[])
|
|||||||
fb_utils::FbShutdown appShutdown(fb_shutrsn_app_stopped);
|
fb_utils::FbShutdown appShutdown(fb_shutrsn_app_stopped);
|
||||||
|
|
||||||
AutoPtr<UtilSvc> uSvc(UtilSvc::createStandalone(argc, argv));
|
AutoPtr<UtilSvc> uSvc(UtilSvc::createStandalone(argc, argv));
|
||||||
|
TraceSvcUtil traceUtil;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TraceSvcUtil traceUtil;
|
|
||||||
|
|
||||||
fbtrace(uSvc, &traceUtil);
|
fbtrace(uSvc, &traceUtil);
|
||||||
}
|
}
|
||||||
catch (const Firebird::Exception& ex)
|
catch (const Firebird::Exception& ex)
|
||||||
{
|
{
|
||||||
Firebird::StaticStatusVector temp;
|
if (!traceUtil.ctrlCHandler.getTerminated())
|
||||||
|
{
|
||||||
|
Firebird::StaticStatusVector temp;
|
||||||
|
|
||||||
ex.stuffException(temp);
|
ex.stuffException(temp);
|
||||||
isc_print_status(temp.begin());
|
isc_print_status(temp.begin());
|
||||||
|
|
||||||
return FINI_ERROR;
|
return FINI_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FINI_OK;
|
return FINI_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user