1
mirror of https://github.com/topjohnwu/Magisk synced 2024-11-14 22:28:37 +01:00

Open log file in append mode

This commit is contained in:
topjohnwu 2018-07-04 23:46:40 +08:00
parent 4de51d93ef
commit ef175e3cbe

View File

@ -129,7 +129,7 @@ void log_daemon() {
// Setup log dumps
rename(LOGFILE, LOGFILE ".bak");
events[LOG_EVENT].fd = xopen(LOGFILE, O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, 0644);
events[LOG_EVENT].fd = xopen(LOGFILE, O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC | O_APPEND, 0644);
int log_fd = -1, log_pid;
char line[PIPE_BUF];