From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows Date: Thu, 14 May 2020 22:00:19 +0300 Message-ID: <83k11e4a0s.fsf@gnu.org> References: <834ksi60zn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="81165"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41242@debbugs.gnu.org, akrl@sdf.org To: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 14 21:01:43 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jZJ70-000L0H-Sv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 21:01:42 +0200 Original-Received: from localhost ([::1]:41264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZJ6z-0000bi-S8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 15:01:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZJ6M-0008MZ-RA for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 15:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51545) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZJ6M-00024o-Fr for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 15:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZJ6M-0008MH-Fc for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 15:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 May 2020 19:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41242 X-GNU-PR-Package: emacs Original-Received: via spool by 41242-submit@debbugs.gnu.org id=B41242.158948284331023 (code B ref 41242); Thu, 14 May 2020 19:01:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 14 May 2020 19:00:43 +0000 Original-Received: from localhost ([127.0.0.1]:34856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZJ63-000844-G1 for submit@debbugs.gnu.org; Thu, 14 May 2020 15:00:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZJ60-0007wW-S1 for 41242@debbugs.gnu.org; Thu, 14 May 2020 15:00:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40562) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZJ5v-0001zi-9f; Thu, 14 May 2020 15:00:35 -0400 Original-Received: from [176.228.60.248] (port=1309 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jZJ5t-0003Ap-Hb; Thu, 14 May 2020 15:00:34 -0400 In-Reply-To: (message from Nicolas =?UTF-8?Q?B=C3=A9rtolo?= on Thu, 14 May 2020 15:40:28 -0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180245 Archived-At: > From: Nicolas BĂ©rtolo > Date: Thu, 14 May 2020 15:40:28 -0300 > Cc: Eli Zaretskii , 41242@debbugs.gnu.org > > * Emacs1 and Emacs2 are two Emacs instances that load the > same foo.eln file. > > * Emacs1 decides to recompile foo.el. To do that it renames foo.eln to > foo.eln.old. It creates a new foo.eln and tries to delete foo.eln.old. It > fails because Emacs2 has an open handle to it. > > * When Emacs2 closes it realizes that foo.eln has been renamed to foo.eln.old > and deletes it. How can Emacs2 realize that foo.eln was renamed? > If we are unlucky this is what may happen: > > * Emacs2 begins to close. It checks that foo.eln has not been renamed. Therefore > it does not delete it. But it does not call FreeLibrary yet. > > * Emacs1 renames foo.eln to foo.eln.old. It tries to delete it but fails since > Emacs2 has an open handle. > > * Emacs2 finally calls FreeLibrary() and closes. > > In this case we are left over with a stale foo.eln.old. I don't think we can > have a race free algorithm. We will have to tell users not to do that on Windows.