diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-12 17:10:04 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-12 17:10:04 +0200 |
commit | 08fca4477cf525cada8c66d309ea1daa2eac88b2 (patch) | |
tree | e02ef89a43306ea6cbfddb129e5987d566aab419 /threads.c | |
parent | 8e60b2daa653b33ac244c8cb1ae4219df9ef414c (diff) | |
download | rsyslog-08fca4477cf525cada8c66d309ea1daa2eac88b2.tar.gz rsyslog-08fca4477cf525cada8c66d309ea1daa2eac88b2.tar.xz rsyslog-08fca4477cf525cada8c66d309ea1daa2eac88b2.zip |
re-enabled input thread termination handling that does avoid thread cancellation
...where possible. This provides a more reliable mode of
rsyslogd termination (canceling threads my result in not properly
freed resouces and potential later hangs, even though we perform
proper cancel handling in our code). This is part of an effort to
reduce thread cnacellation as much as possible in rsyslog.
NOTE: some comments indicated that there were problems with some code
that has been re-activated. Testing did not show any issues. My current
assumption is that these issues were related to some other code that
has been removed/changed during the previous restructuring events.
In any case, if there is a shutdown issue, one should carefully look
at this change here!
Diffstat (limited to 'threads.c')
-rw-r--r-- | threads.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -92,19 +92,14 @@ rsRetVal thrdTerminate(thrdInfo_t *pThis) DEFiRet; assert(pThis != NULL); -#if 0 // TODO: somehow does not really work yet! if(pThis->bNeedsCancel) { -#endif DBGPRINTF("request term via canceling for input thread 0x%x\n", (unsigned) pThis->thrdID); pthread_cancel(pThis->thrdID); -#if 0 // TODO: somehow does not really work yet! - if(pThis->bNeedsCancel) { } else { DBGPRINTF("request term via SIGTTIN for input thread 0x%x\n", (unsigned) pThis->thrdID); pthread_kill(pThis->thrdID, SIGTTIN); } -#endif pthread_join(pThis->thrdID, NULL); /* wait for input thread to complete */ pThis->bIsActive = 0; |