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.
-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__ */
='2017-07-28 23:44:46 -0400'>2017-07-28Add toggle to hnelJune McEnroe 2017-07-28Install slJune McEnroe 2017-07-25Add up, supJune McEnroe 2017-07-24Autopickup ringsJune McEnroe 2017-07-24Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe