mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Bugfixes.
- Data queued at termination wasn't written out completely. - Fixed some race conditions. - Fixing IOSource integration. - Fixing setting thread names on Linux. - Fixing minor leaks. All tests now pass for me on Linux in debug and non-debug compiles. Remaining TODOs: - Needs leak check. - Test on MacOS and FreeBSD. - More testing: - High volume traffic. - Different platforms.
This commit is contained in:
parent
abb506ec63
commit
b8ec653ebf
12 changed files with 100 additions and 30 deletions
|
@ -2,9 +2,14 @@
|
|||
#include <sys/signal.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "BasicThread.h"
|
||||
#include "Manager.h"
|
||||
|
||||
#ifdef HAVE_LINUX
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
using namespace threading;
|
||||
|
||||
uint64_t BasicThread::thread_counter = 0;
|
||||
|
@ -25,6 +30,8 @@ BasicThread::BasicThread()
|
|||
|
||||
BasicThread::~BasicThread()
|
||||
{
|
||||
if ( buf )
|
||||
free(buf);
|
||||
}
|
||||
|
||||
void BasicThread::SetName(const string& arg_name)
|
||||
|
@ -35,8 +42,8 @@ void BasicThread::SetName(const string& arg_name)
|
|||
|
||||
void BasicThread::SetOSName(const string& name)
|
||||
{
|
||||
#ifdef LINUX
|
||||
pthread_setname_np(pthread_self(), name.c_str());
|
||||
#ifdef HAVE_LINUX
|
||||
prctl(PR_SET_NAME, name.c_str(), 0, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue