Open log files with CLOEXEC

weechat-hashes
C. McEnroe 2021-06-21 13:31:05 -04:00
parent 1a336de95c
commit 73181be1ca
1 changed files with 1 additions and 1 deletions

2
log.c
View File

@ -82,7 +82,7 @@ static FILE *logFile(uint id, const struct tm *tm) {
dataMkdir(path); dataMkdir(path);
strftime(&path[len], sizeof(path) - len, "/%F.log", tm); strftime(&path[len], sizeof(path) - len, "/%F.log", tm);
logs[id].file = dataOpen(path, "a"); logs[id].file = dataOpen(path, "ae");
if (!logs[id].file) exit(EX_CANTCREAT); if (!logs[id].file) exit(EX_CANTCREAT);
setlinebuf(logs[id].file); setlinebuf(logs[id].file);