summaryrefslogtreecommitdiffstats
path: root/runtime/stream.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-16 13:53:39 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-16 13:53:39 +0200
commit511fd780a25b59b42e93bb2c9ebc03a4991f5c16 (patch)
tree76f7b578ba2183d7d024197ec9abfd6702ed7af6 /runtime/stream.c
parentcb7f903730f097ebaa02dd12b3280a11e79b256b (diff)
parent8788a04fbed4c05c0c4d28ad060260af226e1e6e (diff)
downloadrsyslog-511fd780a25b59b42e93bb2c9ebc03a4991f5c16.tar.gz
rsyslog-511fd780a25b59b42e93bb2c9ebc03a4991f5c16.tar.xz
rsyslog-511fd780a25b59b42e93bb2c9ebc03a4991f5c16.zip
Merge branch 'beta'
Conflicts: runtime/wti.c runtime/wtp.c
Diffstat (limited to 'runtime/stream.c')
-rw-r--r--runtime/stream.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index 4f611a62..d09531d1 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -48,7 +48,9 @@
#include "stream.h"
#include "unicode-helper.h"
#include "module-template.h"
-#include <sys/prctl.h>
+#if HAVE_SYS_PRCTL_H
+# include <sys/prctl.h>
+#endif
#define inline
@@ -891,9 +893,11 @@ asyncWriterThread(void *pPtr)
ISOBJ_TYPE_assert(pThis, strm);
BEGINfunc
+# if HAVE_PRCTL && defined PR_SET_NAME
if(prctl(PR_SET_NAME, "rs:asyn strmwr", 0, 0, 0) != 0) {
DBGPRINTF("prctl failed, not setting thread name for '%s'\n", "stream writer");
}
+#endif
while(1) { /* loop broken inside */
d_pthread_mutex_lock(&pThis->mut);
@@ -904,7 +908,6 @@ asyncWriterThread(void *pPtr)
goto finalize_it; /* break main loop */
}
if(bTimedOut && pThis->iBufPtr > 0) {
-RUNLOG_STR("XXX: we had a timeout in stream writer");
/* if we timed out, we need to flush pending data */
strmFlush(pThis);
bTimedOut = 0;