diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-25 16:21:01 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-25 16:21:01 +0200 |
commit | c7b309a662a4310a8b878c036d9440e0b2e345a8 (patch) | |
tree | 17868591721a1cde29e5e9cfaadd92883478ad4a /runtime/wtp.c | |
parent | 4818b0081d3a265a87f9f646d79f2a2ffbcda819 (diff) | |
parent | 1f79c785975261e4158c9b85f6451d5bd00b2495 (diff) | |
download | rsyslog-c7b309a662a4310a8b878c036d9440e0b2e345a8.tar.gz rsyslog-c7b309a662a4310a8b878c036d9440e0b2e345a8.tar.xz rsyslog-c7b309a662a4310a8b878c036d9440e0b2e345a8.zip |
Merge branch 'master' into v5-devel
Conflicts:
runtime/queue.c
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r-- | runtime/wtp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c index f5769a72..dc9cbb75 100644 --- a/runtime/wtp.c +++ b/runtime/wtp.c @@ -40,6 +40,7 @@ #include <unistd.h> #include <errno.h> #include <atomic.h> +#include <sys/prctl.h> /// TODO: check on solaris if this is any longer needed - I don't think so - rgerhards, 2009-09-20 //#ifdef OS_SOLARIS @@ -438,6 +439,11 @@ wtpWorker(void *arg) /* the arg is actually a wti object, even though we are in sigfillset(&sigSet); pthread_sigmask(SIG_BLOCK, &sigSet, NULL); + /* set thread name - we ignore if the call fails, has no harsh consequences... */ + if(prctl(PR_SET_NAME, wtpGetDbgHdr(pThis), 0, 0, 0) != 0) { + DBGPRINTF("prctl failed, not setting thread name for '%s'\n", wtpGetDbgHdr(pThis)); + } + BEGIN_MTX_PROTECTED_OPERATIONS(&pThis->mut, LOCK_MUTEX); /* do some late initialization */ |