summaryrefslogtreecommitdiffstats
path: root/runtime/wtp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-08 15:23:25 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-08 15:23:25 +0200
commitcf906392c3039ffa2526316b44ff28bd1d899061 (patch)
tree09c83a8866c917207b7d7130de1c88590c5f2b64 /runtime/wtp.c
parent8e4ad77e54c9d9272cef41f71d94ae277965711e (diff)
parent5221a1e42e16c8c39b48a4a1a18ee6322c38cd17 (diff)
downloadrsyslog-cf906392c3039ffa2526316b44ff28bd1d899061.tar.gz
rsyslog-cf906392c3039ffa2526316b44ff28bd1d899061.tar.xz
rsyslog-cf906392c3039ffa2526316b44ff28bd1d899061.zip
Merge branch 'v4-devel'
Conflicts: runtime/debug.h runtime/stream.c
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r--runtime/wtp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c
index dc9cbb75..81e4446d 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -53,6 +53,7 @@
#include "wtp.h"
#include "wti.h"
#include "obj.h"
+#include "unicode-helper.h"
#include "glbl.h"
/* static data */
@@ -426,6 +427,8 @@ wtpWrkrExecCancelCleanup(void *arg)
static void *
wtpWorker(void *arg) /* the arg is actually a wti object, even though we are in wtp! */
{
+ uchar *pszDbgHdr;
+ uchar thrdName[32] = "rs:";
DEFiRet;
DEFVARS_mutexProtection;
wti_t *pWti = (wti_t*) arg;
@@ -440,7 +443,9 @@ wtpWorker(void *arg) /* the arg is actually a wti object, even though we are in
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) {
+ pszDbgHdr = wtpGetDbgHdr(pThis);
+ ustrncpy(thrdName+3, pszDbgHdr, 20);
+ if(prctl(PR_SET_NAME, thrdName, 0, 0, 0) != 0) {
DBGPRINTF("prctl failed, not setting thread name for '%s'\n", wtpGetDbgHdr(pThis));
}