From mboxrd@z Thu Jan 1 00:00:00 1970 From: mricon at kernel.org (Konstantin Ryabitsev) Date: Fri, 28 Apr 2017 16:36:51 +0000 Subject: [PATCH] cache: flush stdio before restoring FDs In-Reply-To: <20170424185240.GB1788@john.keeping.me.uk> References: <20170424155440.GB15623@gmail.com> <20170424185240.GB1788@john.keeping.me.uk> Message-ID: 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 it's not just ui-patch that is affected by this but also raw diff > which writes to stdout internally. > > Let's avoid risking more places doing this by ensuring that stdout is > flushed after writing in fill_slot(). > Thanks, John, this is working and fixes the truncation bug for both patches and rawdiffs. -Konstantin -- Konstantin Ryabitsev Director, IT Infrastructure Security The Linux Foundation +1-971-258-2363 -------------- next part -------------- An HTML attachment was scrubbed... URL: