From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id D2D8C6DE0C51 for ; Sat, 12 Nov 2016 12:37:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.201 X-Spam-Level: X-Spam-Status: No, score=-0.201 tagged_above=-999 required=5 tests=[AWL=-0.181, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dBx5O9dUfQZ0 for ; Sat, 12 Nov 2016 12:37:27 -0800 (PST) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by arlo.cworth.org (Postfix) with ESMTPS id 731F56DE0AAB for ; Sat, 12 Nov 2016 12:37:27 -0800 (PST) Received: by mail-lf0-f65.google.com with SMTP id o20so3626497lfg.3 for ; Sat, 12 Nov 2016 12:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=HgBaRG2P8yIQXgZrCsVPrvFtqv9Johhnpi7Zlg4skz4=; b=n3vhE9m4IypEnqertmPu03EHYC1NoHQPBEzn53gCdLAoIMUb8UiGHI4GRa2UNFMFWE Ngxij7PsquSvOqjgavi5s+Os+0ZttHjVIDXB6Py2O483EBOwAPDEG+V94xQllMueH3Mt bB3QgNgsB3Btjt/8OfLzeJLjzKOweXV09Gnsj/zEgEiSJ90seXj8G24PAmfmUem6fxlk N566uh6xb9ezAseHzFiMCX78I/YgiVgLXNR6DGDf67mCKza+5Y7fk+nPtqr3G5RBQjbE QUwdpmt0xjXev1F1oltnFYPYS4XLNLfc3lR0HhvCQ3GKPIsSyz00+yy3f1IEmEQByYJ6 R0lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=HgBaRG2P8yIQXgZrCsVPrvFtqv9Johhnpi7Zlg4skz4=; b=Y8S7w6biQS4sb9WZ64K12MTQ9ELldlyhU9zzsIdJnLMrhf4h094zqGKqpcu34eHkLx iIkLFhqyLEX+2HR0px2A9jsCFHIks6Wo53vea7CQS/Y8ouWfFIVZBrpqxwb0dz+2quF3 z4oks1hxyK/bpHD6SYrdrIvobPckZb7fAbca/mI6TXbaQkZNIP1mtqC56s/Fbe40Cbgw hTN20KljzQ2zUBmyFEf0NAZot1TjddNJRhubZjlzmSRY0tFjWxK4X2nhYH2Ca4OmH+es YBVnRh35OVuL/7MC1jWg4NcoJ0GWGDg1dJEhIwC6gVfiuMDg2rnClyoNjQPxI9+d8/7U Lw1Q== X-Gm-Message-State: ABUngvdmgYhSJIp39YETNLwXKNZ1mbifgU10IDU5A7n1GIArPDBQpimUjolAnVG/vVNMQg== X-Received: by 10.25.23.154 with SMTP id 26mr4863345lfx.86.1478983045155; Sat, 12 Nov 2016 12:37:25 -0800 (PST) Received: from localhost (mobile-access-bcee98-78.dhcp.inet.fi. [188.238.152.78]) by smtp.gmail.com with ESMTPSA id y131sm3533919lfd.26.2016.11.12.12.37.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Nov 2016 12:37:24 -0800 (PST) From: Jani Nikula To: Brian Sniffen , David Bremner Cc: Paul Wise , notmuch@notmuchmail.org Subject: Re: [PATCH] cli: consider files vanishing during notmuch new non-fatal In-Reply-To: <60C96E28-48D2-4307-A991-A68469733955@evenmere.org> References: <1478312104.1979.8.camel@debian.org> <1478350621-17137-1-git-send-email-jani@nikula.org> <1478352176.17295.5.camel@debian.org> <87k2c8u2q1.fsf@tethera.net> <60C96E28-48D2-4307-A991-A68469733955@evenmere.org> Date: Sat, 12 Nov 2016 22:35:30 +0200 Message-ID: <87d1i0phbh.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Sat, 12 Nov 2016 20:37:29 -0000 On Sat, 12 Nov 2016, Brian Sniffen wrote: >> >> OK, but the patch proposed works both for people who want to be notified >> of this problem, and those that don't (with appropriate shell wrapping >> checking the return code). > > I think it will loop; how do I guarantee termination and indexing of > all present messages if deletions cause errors? Please note that we're talking about deletions and renames *between* the scandir(3) call and going through the results it returns, during a single invocation of 'notmuch new'. On the next run, scandir(3) won't return the entry, and we'll think it's gone. (Of course, if you keep deleting/renaming files and running 'notmuch new' simultaneously all the time, you'll hit this on some other files on the consequent runs, but then you asked for it...) BR, Jani.