]> git.proxmox.com Git - proxmox-backup.git/commit
log rotate: do NOT overwrite file with possible writers
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Oct 2020 08:05:51 +0000 (10:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Oct 2020 09:09:17 +0000 (11:09 +0200)
commite6ca9c3235dc22f21b4633db8f50c86bfa9e6540
treeec8c277b24ccc81de1b6f4ba03cdf200609833c9
parent0698f78df536e3e246b5335d4f12c4d3797a7419
log rotate: do NOT overwrite file with possible writers

this is not the job of logrotate, and the real 20+ years battle
tested log rotate binary does not do so either as it's actually
pretty dangerous.

If we "replace" the file we break any logger which already opened a
new one here, e.g., a dameon starting up, and thus that writer would
log to nirvana.

It's the job of a logger to create a file if not existing, it makes
no sense to do it here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/tools/logrotate.rs