Re: [PATCH] Properly handle short writes in sigint handlers
authorDavid Bremner <david@tethera.net>
Tue, 10 Jan 2012 11:13:50 +0000 (07:13 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:51 +0000 (09:41 -0800)
bb/e89f01da604064d508a25b8ccc0fca670117bb [new file with mode: 0644]

diff --git a/bb/e89f01da604064d508a25b8ccc0fca670117bb b/bb/e89f01da604064d508a25b8ccc0fca670117bb
new file mode 100644 (file)
index 0000000..55e4bc1
--- /dev/null
@@ -0,0 +1,74 @@
+Return-Path: <bremner@unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4B88F431FD0\r
+       for <notmuch@notmuchmail.org>; Tue, 10 Jan 2012 03:13:55 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id c+3Z7DRWujIc for <notmuch@notmuchmail.org>;\r
+       Tue, 10 Jan 2012 03:13:54 -0800 (PST)\r
+Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id BE227431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 10 Jan 2012 03:13:54 -0800 (PST)\r
+Received: from zancas.localnet\r
+       (fctnnbsc36w-156034072155.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
+       [156.34.72.155]) (authenticated bits=0)\r
+       by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id q0ABDoB0019948\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
+       Tue, 10 Jan 2012 07:13:51 -0400\r
+Received: from bremner by zancas.localnet with local (Exim 4.77)\r
+       (envelope-from <bremner@unb.ca>)\r
+       id 1RkZeI-0001j8-Lm; Tue, 10 Jan 2012 07:13:50 -0400\r
+From: David Bremner <david@tethera.net>\r
+To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>,\r
+       Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] Properly handle short writes in sigint handlers\r
+In-Reply-To: <87fwgbkst0.fsf@gmail.com>\r
+References: <20111222201553.GK10376@mit.edu>\r
+       <1324584948-8009-1-git-send-email-amdragon@mit.edu>\r
+       <87fwgbkst0.fsf@gmail.com>\r
+User-Agent: Notmuch/0.11~rc3 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Tue, 10 Jan 2012 07:13:50 -0400\r
+Message-ID: <87sjjnkdxt.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 10 Jan 2012 11:13:55 -0000\r
+\r
+On Fri, 23 Dec 2011 23:10:35 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
+> Hi Austin.\r
+> \r
+> I think we should put the write loop into a separate function and reuse\r
+> it.\r
+\r
+I could go either way on this, unless there is somewhere else the code\r
+is actually needed at the moment.\r
+\r
+> \r
+> Also, does it make sense to add a retry counter to prevent infinite loop\r
+> if write keeps returning 0?\r
+\r
+I wonder about this too. Is this possibility ignorable Austin?\r
+\r
+d\r