From: mricon at kernel.org (Konstantin Ryabitsev)
Subject: [PATCH] cache: flush stdio before restoring FDs
Date: Fri, 28 Apr 2017 16:36:51 +0000 [thread overview]
Message-ID: <CAMwyc-RduezgyS2LHe5O2aQ0NatfSMnrcENf71YGY8OZ-pt-+A@mail.gmail.com> (raw)
In-Reply-To: <20170424185240.GB1788@john.keeping.me.uk>
On Mon, Apr 24, 2017 at 2:57 PM John Keeping <john at keeping.me.uk> 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: <http://lists.zx2c4.com/pipermail/cgit/attachments/20170428/2d549480/attachment.html>
next prev parent reply other threads:[~2017-04-28 16:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 15:54 Bug: rawdiff output truncated on cache save mricon
2017-04-24 18:52 ` [PATCH] cache: flush stdio before restoring FDs john
2017-04-24 18:55 ` Jason
2017-04-28 16:36 ` mricon [this message]
2017-09-25 12:51 ` mricon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMwyc-RduezgyS2LHe5O2aQ0NatfSMnrcENf71YGY8OZ-pt-+A@mail.gmail.com \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).