mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +00:00
LXC do not truncate container log files on restart
* src/lxc/lxc_driver.c: use O_APPEND instead of O_TRUNC when opening the log file on lxcVmStart()
This commit is contained in:
parent
221b457e69
commit
c73a0c4ac9
@ -1153,7 +1153,7 @@ static int lxcVmStart(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((logfd = open(logfile, O_WRONLY | O_TRUNC | O_CREAT,
|
||||
if ((logfd = open(logfile, O_WRONLY | O_APPEND | O_CREAT,
|
||||
S_IRUSR|S_IWUSR)) < 0) {
|
||||
virReportSystemError(conn, errno,
|
||||
_("failed to open '%s'"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user