unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 28023-done@debbugs.gnu.org
Subject: bug#28023: fix make-temp-file race on local host
Date: Sun, 13 Aug 2017 00:21:03 -0700	[thread overview]
Message-ID: <2ad20ed4-97aa-0823-81af-5757bf0f3033@cs.ucla.edu> (raw)
In-Reply-To: <87k22d7zrb.fsf@detlef>

Michael Albinus wrote:
> Paul Eggert<eggert@cs.ucla.edu>  writes:
> 
>> Tramp needs to support a new method make-temp-file that creates a file
>> (or directory) atomically, as make-temp-file does locally now.
> That means, make-temp-file shall be converted into a magic file name
> operation. I'll do my best, but I don't know whether we could get an
> implementation for all Tramp methods w/o a race condition.
> 
>> Tramp also needs to support the excl flag of write-region (currently
>> it ignores that flag).
> This sounds trivial. And yes, it will help.

Thanks for doing that. Because of that, I'm no longer seeing a race in 
make-temp-file, even for Tramp files. That is, although my proposed patch is 
still a performance win on local files, I don't see how it is a correctness win 
any more. It's still worth installing for the performance reasons, though, so I 
did that and I am marking this bug as done.

>> I was planning to write this up as a bug report after the patch goes
>> in.
> Pls do.

To some extent this is moot now, if I understand things correctly. That is, the 
only reason to write this up now would be for performance reasons, not a race 
condition.

There is still a race involving destination directories, for both Tramp and 
non-Tramp versions. I plan to take a look at that next.





  reply	other threads:[~2017-08-13  7:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09  5:38 bug#28023: fix make-temp-file race on local host Paul Eggert
2017-08-09  6:51 ` Michael Albinus
2017-08-09  9:22   ` Paul Eggert
2017-08-09 11:21     ` Michael Albinus
2017-08-13  7:21       ` Paul Eggert [this message]
2017-08-12 10:35     ` Michael Albinus
2017-08-12 15:55       ` Paul Eggert
2017-08-12 16:09         ` Eli Zaretskii
2017-08-12 16:25           ` Paul Eggert
2017-08-12 16:52             ` Eli Zaretskii
2017-08-12 17:57               ` Paul Eggert
2017-08-12 18:07                 ` Eli Zaretskii
2017-08-12 17:51         ` Michael Albinus
2017-08-09 16:05 ` Eli Zaretskii
2017-08-09 18:47   ` Paul Eggert
2017-08-09 19:09     ` Eli Zaretskii
2017-08-09 23:36       ` Paul Eggert
2017-08-10 15:35         ` Eli Zaretskii
2017-08-10 22:24           ` Paul Eggert
2017-08-11  6:21             ` Eli Zaretskii
2017-08-11  7:44               ` Paul Eggert
2017-08-11  8:03                 ` Eli Zaretskii
2017-08-12  8:31                   ` 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=2ad20ed4-97aa-0823-81af-5757bf0f3033@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=28023-done@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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).