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