← Commit list

1b90e031c

Joshua Judson Rosen
Joshua Judson Rosen
2014-06-02
SUCCESS Duration: 145s

Subject

syslogd: avoid spurious ftrunctate() calls for "-b 0"

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

sysklogd/syslogd.c+6 -0
@@ -663,7 +663,13 @@ static void log_locally(time_t now, char *msg, logFile_t *log_file)
close(log_file->fd);
goto reopen;
}
+
+ /* We don't get here unless G.logFileRotate == 0;
+ * in which case don't bother unlinking and reopening,
+ * just truncate and reset size to match:
+ */
ftruncate(log_file->fd, 0);
+ log_file->size = 0;
}
log_file->size +=
#endif