From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Fri, 17 Dec 2021 10:28:28 +0200 Message-ID: <83o85feitv.fsf@gnu.org> References: <87tufmjyai.fsf@gnus.org> <87mtl13vz2.fsf@gnus.org> <87ilvp3tzo.fsf@gnus.org> <83wnk5gduf.fsf@gnu.org> <87r1ab1y0r.fsf@gnus.org> <83sfurejs6.fsf@gnu.org> <871r2b1vu8.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14244"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 17 09:29:37 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1my8cT-0003aR-3d for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Dec 2021 09:29:37 +0100 Original-Received: from localhost ([::1]:40984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1my8cR-0006Au-TY for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Dec 2021 03:29:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my8bb-0004op-Ab for emacs-devel@gnu.org; Fri, 17 Dec 2021 03:28:43 -0500 Original-Received: from [2001:470:142:3::e] (port=38706 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my8bb-0003pe-19; Fri, 17 Dec 2021 03:28:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lvNtESR6xlELHe3TD3qpsiV/ojeFzYn2Fu1pMkmtkSA=; b=j20YPhvZnDns x3x8IzATMJkvVAWaHFE31ARlF4HXHCUk/hYhs+SHzqaIA1G0MhnySY3GOAGrfVnNflWg/QsSGBbt4 SI3fpvTwfAVu1ei3DANzHi3LbzvfYgGVdFIlZImbBkJVBk7ejl4cKpieLGfoWTJ3rlFYhBzzeEGLN tMEZtn6ZpWfoxRKnkfZdgxPOWdywz9QFImHI2yolWLgfmgRdF7jnkFrwRFZNtELoWo8mg/8oZtini UDk0ViKqtR8mx1tErDRzRpagcjXWXZPQZ7Dunkfp3NC8/KA1ppL+g/y2IEihcqGjc3gtZ9cqeIxTG U0mSEtitn6rwkmPck9flNw==; Original-Received: from [87.69.77.57] (port=1516 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my8ba-0000b0-Qp; Fri, 17 Dec 2021 03:28:43 -0500 In-Reply-To: <871r2b1vu8.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 17 Dec 2021 09:25:51 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:282200 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Fri, 17 Dec 2021 09:25:51 +0100 > > Eli Zaretskii writes: > > > If Emacs 1 attempts to open and read the file while Emacs 2 still > > writes to it, Windows will not let Emacs 1 open the file, and the > > failure will be EACCES, as your report shows. That's because the > > default way of opening files which we use in Emacs opens them in > > "unshared" mode, so they cannot be shared between different processes. > > But in this case, Emacs 2 should have exited already before we try to > read the file... I think. I'll try to debug this more thoroughly; > perhaps I was misinterpreting what I was seeing. > > > Which probably means multisession.el should have some mechanism to > > deal with this gracefully, like retrying the open/read several times > > before giving up. After all, the window for such races should be > > quite short, given that we write very small files. > > Yup. It does this in the sqlite case, so I'll replicate the logic in > the files case, too. But it seemed very mysterious to me that I was > getting a permission denied after Emacs 2 had exited. If you are sure the second session already exited, then my hand-waving doesn't hold water.