diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-08-21 10:37:59 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-08-21 10:37:59 +0200 |
commit | 596383988792635f128cb645c9b7c8aae50453e6 (patch) | |
tree | 5e5ba6dc03b6e9b687b09f49828b5a1fcdda1cda /runtime/wtp.c | |
parent | 8624f937523c1ca78cc1d78b8eba18f628ae9ab5 (diff) | |
parent | daa76ad94428599336ddafdd6854dc0b71356180 (diff) | |
download | rsyslog-596383988792635f128cb645c9b7c8aae50453e6.tar.gz rsyslog-596383988792635f128cb645c9b7c8aae50453e6.tar.xz rsyslog-596383988792635f128cb645c9b7c8aae50453e6.zip |
Merge branch 'v4-devel' into v4-beta
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r-- | runtime/wtp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c index 87c3b324..596ff866 100644 --- a/runtime/wtp.c +++ b/runtime/wtp.c @@ -54,6 +54,7 @@ #include "wtp.h" #include "wti.h" #include "obj.h" +#include "unicode-helper.h" #include "glbl.h" /* static data */ @@ -422,6 +423,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; @@ -437,7 +440,9 @@ wtpWorker(void *arg) /* the arg is actually a wti object, even though we are in # if HAVE_PRCTL && defined PR_SET_NAME /* 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)); } # endif |