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 DE1386DE091C for ; Mon, 14 Nov 2016 10:59:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 tagged_above=-999 required=5 tests=[AWL=0.005, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-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 rnjO31CPsPBI for ; Mon, 14 Nov 2016 10:59:16 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 490596DE02AC for ; Mon, 14 Nov 2016 10:59:15 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1c6MSw-0002zj-8D; Mon, 14 Nov 2016 13:58:50 -0500 Received: (nullmailer pid 5887 invoked by uid 1000); Mon, 14 Nov 2016 18:59:06 -0000 From: David Bremner To: "J. Lewis Muir" , Austin Clements Cc: notmuch@notmuchmail.org, Paul Wise Subject: Re: [Paul Wise] Bug#843127: notmuch: race condition in `notmuch new`? In-Reply-To: <20161114184402.GB23082@tuna.imca.aps.anl.gov> References: <87a8dfl8em.fsf@tesseract.cs.unb.ca> <87a8df9pp2.fsf@tesseract.cs.unb.ca> <20161113015107.GC5670@csail.mit.edu> <20161114184402.GB23082@tuna.imca.aps.anl.gov> Date: Mon, 14 Nov 2016 14:59:06 -0400 Message-ID: <877f85nb0l.fsf@tesseract.cs.unb.ca> 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: Mon, 14 Nov 2016 18:59:17 -0000 "J. Lewis Muir" writes: > On 11/12, Austin Clements wrote: >> Quoth David Bremner on Nov 04 at 1:26 pm: >> > I agree it looks like a race condition. inotify sounds a bit >> > overcomplicated and perhaps non-portable? It should probably just >> > tolerate disappearing files better, consider that a warning. >> >> Inotify really *is* the solution. > > I don't see how inotify can be the solution unless the idea is to make > Notmuch run on Linux only. Inotify is a Linux kernel API. Some other > OSes have their own native file event notification facilities, but not > all of them have it, and most (if not all) only support file event > notifications for certain file systems and not for others (e.g., not for > NFS). Yeah, it's worth saying that, even if I think Austin knows. I was thinking that an alternative approach might be to have either notmuch new or notmuch insert take a file name on the command line, and let the user call it via what ever kind of directory watcher utility works on their system. d