Re: [PATCH] cache: flush stdio before restoring FDs

2017-04-28 Thread Konstantin Ryabitsev
On Mon, Apr 24, 2017 at 2:57 PM John Keeping wrote: > As described in commit 2efb59e (ui-patch: Flush stdout after outputting > data, 2014-06-11), we need to ensure that stdout is flushed before > restoring the file descriptor when writing to the cache. It turns out > that

Re: [PATCH] cache: flush stdio before restoring FDs

2017-04-24 Thread Jason A. Donenfeld
Hey John, Wow, that was quick. Konstantin and I were just talking about this. I'll review this and merge things asap. Another related thing were were discussing and I was just investigating is the inherent buffering that our cache system uses. When it's filling a slot, everything is buffered

[PATCH] cache: flush stdio before restoring FDs

2017-04-24 Thread John Keeping
As described in commit 2efb59e (ui-patch: Flush stdout after outputting data, 2014-06-11), we need to ensure that stdout is flushed before restoring the file descriptor when writing to the cache. It turns out that it's not just ui-patch that is affected by this but also raw diff which writes to