aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryaworsky <yaworsky>2005-11-17 04:49:41 +0000
committeryaworsky <yaworsky>2005-11-17 04:49:41 +0000
commitabcf1cdf7337fdb09e553e51a8b36216e37575d6 (patch)
tree63f764edfa31640ebdd91a44b80023f9ebf76f11
parent8849aedae75cec193d273badb2a5687c04e098a7 (diff)
downloadsyslog-win32-abcf1cdf7337fdb09e553e51a8b36216e37575d6.tar.gz
syslog-win32-abcf1cdf7337fdb09e553e51a8b36216e37575d6.tar.xz
syslog-win32-abcf1cdf7337fdb09e553e51a8b36216e37575d6.zip
Described race condition.
-rw-r--r--daemon/dest_file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/daemon/dest_file.c b/daemon/dest_file.c
index f08cedb..fb63195 100644
--- a/daemon/dest_file.c
+++ b/daemon/dest_file.c
@@ -421,6 +421,11 @@ static unsigned __stdcall writer_thread_proc( void* arg )
}
done:
+ /* FIXME: possible race condition
+ We detach writer from destination before close file.
+ So if a new message has arrived and detached writer is flushing its queue
+ then a new instance will can not open file.
+ */
detach_writer_from_destination( writer );
pop_messages_from_queue( writer );
flush_coalescer( writer );