GNU bug report logs -
#28023
fix make-temp-file race on local host
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Wed, 9 Aug 2017 05:39:02 UTC
Severity: important
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 13 Aug 2017 00:21:03 -0700
with message-id <2ad20ed4-97aa-0823-81af-5757bf0f3033 <at> cs.ucla.edu>
and subject line Re: bug#28023: fix make-temp-file race on local host
has caused the debbugs.gnu.org bug report #28023,
regarding fix make-temp-file race on local host
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
28023: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28023
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Tags: patch
Severity: important
I plan to install the attached patch in master soon, and am sending it for
review to bug-gnu-emacs first in case there's some problem with it on
MS-Windows. Although this patch does not fix all instances of the race in Gnu
Emacs (notably, Tramp access is still affected) it's a good start.
[0001-Fix-make-temp-file-race-on-local-files.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
Michael Albinus wrote:
> Paul Eggert<eggert <at> 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.
This bug report was last modified 7 years and 280 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.