From: nstraz@redhat.com
To: Michal Sojka <sojkam1@fel.cvut.cz>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] Setup the GMimeStream only when needed
Date: Thu, 1 Apr 2010 10:31:13 -0400 [thread overview]
Message-ID: <20100401143113.GE25669@redhat.com> (raw)
In-Reply-To: <87wrwr45k5.fsf@steelpick.2x.cz>
On Apr 1 16:21, Michal Sojka wrote:
> On Thu, 01 Apr 2010, nstraz@redhat.com wrote:
> > I ran into this while looking at the vim plugin. Vim's system() call
> > redirects output to a file and it was missing many of the part{ lines.
> >
> > If stream_stdout is setup too early, it will overwrite the part start
> > when notmuch is redirected to a file.
>
> thanks for the patch. After some investigation, it seems that you are
> right. What I missed in your commit message is the reason for such
> behaviour i.e. GMimeStream fseek()s in its write method to the position
> recorded when the stream was created, so that in case there is somebody
> else writing to the stream, the writes may overlap.
Right, and in the case of writing to a pipe, the seek fails and the
file position doesn't change. I found it comparing strace output of
`notmuch show ... > file` and `notmuch show ... | cat > file.`
Nate
next prev parent reply other threads:[~2010-04-01 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 13:47 [PATCH] Setup the GMimeStream only when needed nstraz
2010-04-01 14:21 ` Michal Sojka
2010-04-01 14:31 ` nstraz [this message]
2010-04-01 21:31 ` Carl Worth
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
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100401143113.GE25669@redhat.com \
--to=nstraz@redhat.com \
--cc=notmuch@notmuchmail.org \
--cc=sojkam1@fel.cvut.cz \
/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.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).