about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-01-28 03:05:53 -0500
committerJune McEnroe <june@causal.agency>2020-01-28 03:05:53 -0500
commitd1533241f699359b7d171f12e4131a46a4c35935 (patch)
tree183d6b75bac226e3be086ab292ca20c0a3c94d4f
parentExit git-fetch-email on getopt failure (diff)
downloadimbox-d1533241f699359b7d171f12e4131a46a4c35935.tar.gz
imbox-d1533241f699359b7d171f12e4131a46a4c35935.zip
Call fopencookie with a+
Otherwise interleaved reads and writes can interfere with each other,
since you're supposed to have intervening fseeks.
Diffstat (limited to '')
-rw-r--r--compat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat.h b/compat.h
index 55dda53..8110e24 100644
--- a/compat.h
+++ b/compat.h
@@ -84,7 +84,7 @@ funopen(
 	if (!funopen) return NULL;
 	assert(!seekfn);
 	*funopen = (struct _funopen) { (void *)cookie, readfn, writefn, closefn };
-	return fopencookie(funopen, "r+", _cookie_fns);
+	return fopencookie(funopen, "a+", _cookie_fns);
 }
 
 #endif /* __linux__ */
colspan='3' class='logmsg'> 2022-07-26Add -w to upJune McEnroe 2022-07-13Set push.autoSetupRemoteJune McEnroe 2022-07-08Remove TOURJune McEnroe There is not that much distinct stuff here anymore. 2022-07-03Add The Bone Shard EmperorJune McEnroe Suffers a little bit from middle book but I really enjoyed it. Read it faster than the first one too, despite its length. 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune 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