Open save file with CLOEXEC
Otherwise a lingering process from /copy for example could hold the lock.master
parent
585039fb6e
commit
1a336de95c
2
ui.c
2
ui.c
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue