summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-02-10 08:27:24 +0100
committerSébastien Helleu <flashcode@flashtux.org>2018-02-10 08:27:24 +0100
commit24c5db49b167fd699d52161167c7670b0e3736a5 (patch)
tree52161c240c3849837e96ed447e7fca2556eaadf1 /src
parent710db5dbcdf10eb7ae449af8ef707f08ba77e89e (diff)
downloadweechat-24c5db49b167fd699d52161167c7670b0e3736a5.zip
logger: call fsync even when option logger.file.flush_delay is set to 0 (issue #1145)
This is not recommended anyway to turn on fsync with a delay set to 0, it will slow down WeeChat a lot, especially with many buffers opened.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/logger/logger.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c
index 87a83bb52..a6014464a 100644
--- a/src/plugins/logger/logger.c
+++ b/src/plugins/logger/logger.c
@@ -606,6 +606,8 @@ logger_write_line (struct t_logger_buffer *logger_buffer,
if (!logger_timer)
{
fflush (logger_buffer->log_file);
+ if (weechat_config_boolean (logger_config_file_fsync))
+ fsync (fileno (logger_buffer->log_file));
logger_buffer->flush_needed = 0;
}
free (vbuffer);