8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 12:03:02 +01:00

Improvement CORE-3324 : ftracemgr should flush its output from time to time

This commit is contained in:
hvlad 2011-02-02 11:36:42 +00:00
parent 1633598aa3
commit 914a21e766

View File

@ -252,6 +252,7 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
p = results; p = results;
bool ignoreTruncation = false; bool ignoreTruncation = false;
bool dirty = false;
noData = true; noData = true;
while (*p != isc_info_end) while (*p != isc_info_end)
@ -273,6 +274,7 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
fprintf(stdout, "%s", p); fprintf(stdout, "%s", p);
p[l] = ch; p[l] = ch;
p += l; p += l;
dirty = true;
} }
noData = (l == 0); noData = (l == 0);
} }
@ -285,6 +287,11 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
case isc_info_svc_timeout: case isc_info_svc_timeout:
noData = false; noData = false;
if (dirty)
{
fflush(stdout);
dirty = false;
}
break; break;
default: default: