Open save file with CLOEXEC

Otherwise a lingering process from /copy for example could hold the
lock.
weechat-hashes
C. McEnroe 2021-06-21 13:26:55 -04:00
parent 585039fb6e
commit 1a336de95c
1 changed files with 1 additions and 1 deletions

2
ui.c
View File

@ -1181,7 +1181,7 @@ static ssize_t readString(FILE *file, char **buf, size_t *cap) {
} }
void uiLoad(const char *name) { void uiLoad(const char *name) {
saveFile = dataOpen(name, "a+"); saveFile = dataOpen(name, "a+e");
if (!saveFile) exit(EX_CANTCREAT); if (!saveFile) exit(EX_CANTCREAT);
rewind(saveFile); rewind(saveFile);