1 Return-Path: <nstraz@redhat.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 5B6F04196F0
\r
6 for <notmuch@notmuchmail.org>; Thu, 1 Apr 2010 07:31:18 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-5.001 tagged_above=-999 required=5
\r
12 tests=[BAYES_20=-0.001, RCVD_IN_DNSWL_HI=-5] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 9RwxGa7hagt3 for <notmuch@notmuchmail.org>;
\r
16 Thu, 1 Apr 2010 07:31:17 -0700 (PDT)
\r
17 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 8C1B7431FC1
\r
19 for <notmuch@notmuchmail.org>; Thu, 1 Apr 2010 07:31:17 -0700 (PDT)
\r
20 Received: from int-mx01.intmail.prod.int.phx2.redhat.com
\r
21 (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
\r
22 by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o31EVEFY029959
\r
23 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
\r
24 Thu, 1 Apr 2010 10:31:14 -0400
\r
25 Received: from tin.rawstew (ovpn01.gateway.prod.ext.phx2.redhat.com
\r
26 [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with
\r
27 ESMTP id o31EVD5v009098; Thu, 1 Apr 2010 10:31:14 -0400
\r
28 Received: by tin.rawstew (Postfix, from userid 10119)
\r
29 id 38D86506C5; Thu, 1 Apr 2010 10:31:13 -0400 (EDT)
\r
30 Date: Thu, 1 Apr 2010 10:31:13 -0400
\r
31 To: Michal Sojka <sojkam1@fel.cvut.cz>
\r
32 Message-ID: <20100401143113.GE25669@redhat.com>
\r
33 References: <20100401134721.GD25669@redhat.com>
\r
34 <87wrwr45k5.fsf@steelpick.2x.cz>
\r
36 Content-Type: text/plain; charset=us-ascii
\r
37 Content-Disposition: inline
\r
38 In-Reply-To: <87wrwr45k5.fsf@steelpick.2x.cz>
\r
39 User-Agent: Mutt/1.5.20 (2009-08-17)
\r
40 From: nstraz@redhat.com
\r
41 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
\r
42 Cc: notmuch@notmuchmail.org
\r
43 Subject: Re: [notmuch] [PATCH] Setup the GMimeStream only when needed
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Thu, 01 Apr 2010 14:31:18 -0000
\r
58 On Apr 1 16:21, Michal Sojka wrote:
\r
59 > On Thu, 01 Apr 2010, nstraz@redhat.com wrote:
\r
60 > > I ran into this while looking at the vim plugin. Vim's system() call
\r
61 > > redirects output to a file and it was missing many of the part{ lines.
\r
63 > > If stream_stdout is setup too early, it will overwrite the part start
\r
64 > > when notmuch is redirected to a file.
\r
66 > thanks for the patch. After some investigation, it seems that you are
\r
67 > right. What I missed in your commit message is the reason for such
\r
68 > behaviour i.e. GMimeStream fseek()s in its write method to the position
\r
69 > recorded when the stream was created, so that in case there is somebody
\r
70 > else writing to the stream, the writes may overlap.
\r
72 Right, and in the case of writing to a pipe, the seek fails and the
\r
73 file position doesn't change. I found it comparing strace output of
\r
74 `notmuch show ... > file` and `notmuch show ... | cat > file.`
\r