about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-06-21 13:31:05 -0400
committerJune McEnroe <june@causal.agency>2021-06-21 13:31:05 -0400
commit73181be1ca02a37f09cb2515619edf49ecc73c1c (patch)
tree322ac1b043efba2e87e8382adfa656b7bbdba0e3
parentOpen save file with CLOEXEC (diff)
downloadcatgirl-73181be1ca02a37f09cb2515619edf49ecc73c1c.tar.gz
catgirl-73181be1ca02a37f09cb2515619edf49ecc73c1c.zip
Open log files with CLOEXEC
Diffstat (limited to '')
-rw-r--r--log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/log.c b/log.c
index 11edb52..2efb2e4 100644
--- a/log.c
+++ b/log.c
@@ -82,7 +82,7 @@ static FILE *logFile(uint id, const struct tm *tm) {
 	dataMkdir(path);
 
 	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);
 
 	setlinebuf(logs[id].file);
td>June McEnroe Mixed bag like most collections of short stories. Some of them are pretty good. The author of the worst written story also has the worst written bio. 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe Absolutely indiscriminately. 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe For some reason I haven't been able to figure out, trying to poll /dev/tty returns POLLNVAL (and this was using 100% CPU looping), but using stderr instead works fine. 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe