unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Matt M <mmerino@outlook.fr>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "46972@debbugs.gnu.org" <46972@debbugs.gnu.org>,
	"akrl@sdf.org" <akrl@sdf.org>
Subject: bug#46972: RE : RE : RE : RE : bug#46972: 28.0.50; [feature/native-comp] Emacs locks itself during native compilation because of permission denied
Date: Fri, 12 Mar 2021 11:37:22 +0000	[thread overview]
Message-ID: <DB6P190MB0327531E10DFF3BEE5DDF546D66F9@DB6P190MB0327.EURP190.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <83r1kklt7i.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]

If I understand correctly, this is what happens currently :

  1.  Rename oldfile to new temporary name
  2.  Rename newfile to oldfile
  3.  If rename in 2) failed because oldfile has been recreated, go back to 1)
With my change it becomes :

  1.  Delete oldfile
  2.  Rename newfile to oldfile
  3.  If rename in 2) failed because oldfile has been recreated, go back to 1)

The only difference being that oldfile is deleted instead of keeping an .eln.old file.
In the non Windows version of the code no .eln.old file is created anyway.

The problem on Windows is that the oldfile could reappear and block step 2),
so the while loop is necessary, but I keep it in my proposed change.

Or maybe I misunderstood entirely
De : Eli Zaretskii<mailto:eliz@gnu.org>
Envoyé le :vendredi 12 mars 2021 08:36
À : Matt M<mailto:MMERINO@OUTLOOK.FR>
Cc : akrl@sdf.org<mailto:akrl@sdf.org>; 46972@debbugs.gnu.org<mailto:46972@debbugs.gnu.org>
Objet :Re: RE : RE : RE : bug#46972: 28.0.50; [feature/native-comp] Emacs locks itself during native compilation because of permission denied

> From: Matt M <mmerino@outlook.fr>
> CC: "46972@debbugs.gnu.org" <46972@debbugs.gnu.org>
> Date: Fri, 12 Mar 2021 00:26:18 +0000
>
> The Following patch seems to fix my problem :
> --- a/lisp/emacs-lisp/comp.el
> +++ b/lisp/emacs-lisp/comp.el
> @@ -3778,13 +3778,7 @@ comp-delete-or-replace-file
>           (while
>               (condition-case _
>                   (progn
> -                   ;; oldfile maybe recreated by another Emacs in
> -                   ;; between the following two rename-file calls
> -                   (if (file-exists-p oldfile)
> -                       (rename-file oldfile (make-temp-file-internal
> -                                             (file-name-sans-extension oldfile)
> -                                             nil ".eln.old" nil)
> -                                    t))
> +                   (delete-file oldfile)
>                     (when newfile
>                       (rename-file newfile oldfile nil))
>                     ;; Keep on trying.
> Changed the call to rename-file to delete-file.

Thanks, but I don't think we can use this solution, due to the reason
explained in the comment there.  (You can, of course, use it locally,
if the danger described there is not relevant for your usage.)

I apologize that I didn't yet have time to recreate the problem you
described and look into it: the native-comp branch is still not stable
enough for me to try such non-trivial situations.  I didn't forget,
though.


[-- Attachment #2: Type: text/html, Size: 9816 bytes --]

  reply	other threads:[~2021-03-12 11:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-06 17:23 bug#46972: 28.0.50; [feature/native-comp] Emacs locks itself during native compilation because of permission denied Matt M
2021-03-06 18:34 ` Eli Zaretskii
2021-03-06 18:52   ` bug#46972: RE : " Matt M
2021-03-06 19:01     ` Eli Zaretskii
2021-03-06 19:02       ` bug#46972: RE : " Matt M
2021-03-06 20:03         ` Eli Zaretskii
2021-03-06 20:14           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-06 20:16             ` Eli Zaretskii
2021-03-12  0:26               ` bug#46972: RE : " Matt M
2021-03-12  7:36                 ` Eli Zaretskii
2021-03-12 11:37                   ` Matt M [this message]
2021-03-12 12:45                     ` bug#46972: RE : " Eli Zaretskii
2021-03-12 12:53                       ` bug#46972: RE : " Matt M
2021-03-14 10:51 ` Eli Zaretskii
2021-03-14 13:39   ` Eli Zaretskii
2021-03-14 14:07     ` bug#46972: RE : " Matt M
2021-03-14 14:24       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB6P190MB0327531E10DFF3BEE5DDF546D66F9@DB6P190MB0327.EURP190.PROD.OUTLOOK.COM \
    --to=mmerino@outlook.fr \
    --cc=46972@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).