diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-16 13:51:52 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-16 13:51:52 +0200 |
commit | 1d0806b9e3c6e83443c8daa9da8f25bd4df75f9b (patch) | |
tree | 6d52e750cfff12e66b99f46729b953fd656e00d0 /runtime/stream.c | |
parent | 214e5ec7c068efaa250d106d279d50ad07a85006 (diff) | |
download | rsyslog-1d0806b9e3c6e83443c8daa9da8f25bd4df75f9b.tar.gz rsyslog-1d0806b9e3c6e83443c8daa9da8f25bd4df75f9b.tar.xz rsyslog-1d0806b9e3c6e83443c8daa9da8f25bd4df75f9b.zip |
calls to prctl() need to be based on configure results (cross-platform issue)
This is for another prctl() call, not present in the beta version (looks like it
would make sense to stick these into a utility function)
Diffstat (limited to 'runtime/stream.c')
-rw-r--r-- | runtime/stream.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/stream.c b/runtime/stream.c index a0571a61..605a9771 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; |