Updating thread naming.

Also includes experimental code to adapt the thread name as shown by
top, but it's untested.
This commit is contained in:
Robin Sommer 2012-02-03 04:01:24 -08:00
parent cf6a346b86
commit 70fe7876a1
12 changed files with 81 additions and 14 deletions

View file

@ -99,6 +99,7 @@ WriterFrontend::WriterFrontend(bro_int_t type)
buf = true;
write_buffer = 0;
write_buffer_pos = 0;
ty_name = "<not set>";
backend = log_mgr->CreateBackend(this, type);
assert(backend);
@ -109,6 +110,14 @@ WriterFrontend::~WriterFrontend()
{
}
string WriterFrontend::Name() const
{
if ( path.size() )
return ty_name;
return ty_name + "/" + path;
}
void WriterFrontend::Stop()
{
FlushWriteBuffer();