Fix a couple of make-temp-file races
commit785a4a1d52fd7da3f3169fda26841341667c1661
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Aug 2017 04:27:45 +0000 (5 21:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Aug 2017 04:28:09 +0000 (5 21:28 -0700)
tree456a79a178ba18701ad5f0b5d5b9993414f1e27d
parentc0df64db08b58cdac37cb38c16f2ba2f097fae92
Fix a couple of make-temp-file races

* lisp/emacs-lisp/autoload.el (autoload--save-buffer):
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Use make-temp-file, not make-temp-name, to avoid an unlikely race
that could lose data.  Remove the deletion hook as quickly as
possible after the file is renamed; though a race still remains
here, it is smaller than before.
lisp/emacs-lisp/autoload.el
lisp/emacs-lisp/bytecomp.el