From 1a336de95cb424684ac4ae8b213bba8bc9342312 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 21 Jun 2021 13:26:55 -0400 Subject: Open save file with CLOEXEC Otherwise a lingering process from /copy for example could hold the lock. --- ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui.c') diff --git a/ui.c b/ui.c index 8f8de1e..9d67387 100644 --- a/ui.c +++ b/ui.c @@ -1181,7 +1181,7 @@ static ssize_t readString(FILE *file, char **buf, size_t *cap) { } void uiLoad(const char *name) { - saveFile = dataOpen(name, "a+"); + saveFile = dataOpen(name, "a+e"); if (!saveFile) exit(EX_CANTCREAT); rewind(saveFile); -- cgit 1.4.1