diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-16 13:53:39 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-16 13:53:39 +0200 |
commit | 511fd780a25b59b42e93bb2c9ebc03a4991f5c16 (patch) | |
tree | 76f7b578ba2183d7d024197ec9abfd6702ed7af6 /runtime/wtp.c | |
parent | cb7f903730f097ebaa02dd12b3280a11e79b256b (diff) | |
parent | 8788a04fbed4c05c0c4d28ad060260af226e1e6e (diff) | |
download | rsyslog-511fd780a25b59b42e93bb2c9ebc03a4991f5c16.tar.gz rsyslog-511fd780a25b59b42e93bb2c9ebc03a4991f5c16.tar.xz rsyslog-511fd780a25b59b42e93bb2c9ebc03a4991f5c16.zip |
Merge branch 'beta'
Conflicts:
runtime/wti.c
runtime/wtp.c
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r-- | runtime/wtp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c index 0beef263..470e0b03 100644 --- a/runtime/wtp.c +++ b/runtime/wtp.c @@ -40,7 +40,9 @@ #include <unistd.h> #include <errno.h> #include <atomic.h> -#include <sys/prctl.h> +#if HAVE_SYS_PRCTL_H +# include <sys/prctl.h> +#endif /// TODO: check on solaris if this is any longer needed - I don't think so - rgerhards, 2009-09-20 //#ifdef OS_SOLARIS @@ -355,12 +357,14 @@ wtpWorker(void *arg) /* the arg is actually a wti object, even though we are in sigfillset(&sigSet); pthread_sigmask(SIG_BLOCK, &sigSet, NULL); +# if HAVE_PRCTL && defined PR_SET_NAME /* set thread name - we ignore if the call fails, has no harsh consequences... */ 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 BEGIN_MTX_PROTECTED_OPERATIONS(&pThis->mut, LOCK_MUTEX); |