summaryrefslogtreecommitdiffstats
path: root/runtime/wtp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-06 16:38:09 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-06 16:38:09 +0200
commite3040285dbf0854443bc2443e0de5ac59f6f839e (patch)
tree557eae59b899f2311a9a8ba80ea32e465fff3e9a /runtime/wtp.c
parent7fdeac0bdcaad3525f203ae5dc1fa7636078e37f (diff)
downloadrsyslog-e3040285dbf0854443bc2443e0de5ac59f6f839e.tar.gz
rsyslog-e3040285dbf0854443bc2443e0de5ac59f6f839e.tar.xz
rsyslog-e3040285dbf0854443bc2443e0de5ac59f6f839e.zip
first shot at asynchronous stream writer with timeout capability
... seems to work on quick testing, but needs a far more testing and improvement. Good milestone commit.
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r--runtime/wtp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c
index 02662cde..e37ebddf 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -421,6 +421,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;
@@ -435,7 +437,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);
+ strncpy(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));
}