1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
emacs/lisp/emacs-lisp
Nicolás Bértolo 1b809f378f Improve handling of native compilation units still in use in Windows
When closing emacs will inspect all directories from which it loaded
native compilation units. If it finds a ".eln.old" file it will try to
delete it, if it fails that means that another Emacs instance is using it.

When compiling a file we rename the file that was in the output path
in case it has been loaded into another Emacs instance.

When deleting a package we move any ".eln" or ".eln.old" files in the
package folder that we can't delete to `package-user-dir`. Emacs will
check that directory when closing and delete them.

* lisp/emacs-lisp/comp.el (comp--replace-output-file): Function called
from C code to finish the compilation process. It performs renaming of
the old file if necessary.
* lisp/emacs-lisp/package.el (package--delete-directory): Function to
delete a package directory. It moves native compilation units that it
can't delete to `package-user-dir'.
* src/alloc.c (cleanup_vector): Call dispose_comp_unit().
  (garbage_collect): Call finish_delayed_disposal_of_comp_units().
* src/comp.c: Restore the signal mask using unwind-protect. Store
loaded native compilation units in a hash table for disposal on
close. Store filenames of native compilation units GC'd in a linked
list to finish their disposal when the GC is over.
(clean_comp_unit_directory): Delete all *.eln.old files in a
directory.
(clean_package_user_dir_of_old_comp_units): Delete all *.eln.old files
in `package-user-dir'.
(dispose_all_remaining_comp_units): Dispose of native compilation
units that are still loaded.
(dispose_comp_unit): Close handle and cleanup directory or arrange for
later cleanup if DELAY is true.
(finish_delayed_disposal_of_comp_units): Dispose of native compilation
units that were GC'd.
(register_native_comp_unit): Register native compilation unit for
disposal when Emacs closes.
* src/comp.h: Introduce cfile member in Lisp_Native_Comp_Unit.
Add declarations of functions that: clean directories of unused native
compilation units, handle disposal of native compilation units.
* src/emacs.c (kill-emacs): Dispose all remaining compilation units
right right before calling exit().
* src/eval.c (internal_condition_case_3, internal_condition_case_4):
Add functions.
* src/lisp.h (internal_condition_case_3, internal_condition_case_4):
Add functions.
* src/pdumper.c (dump_do_dump_relocation): Set cfile to a copy of the
Lisp string specifying the file path.
2020-05-25 09:42:10 +01:00
..
advice.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
autoload.el Merge remote-tracking branch 'savannah/master' into HEAD 2020-04-16 17:35:35 +01:00
avl-tree.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
backquote.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
backtrace.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
benchmark.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
bindat.el Add new tests to bindat-tests.el 2020-04-29 09:52:34 +02:00
byte-opt.el Don’t attempt to modify constant conses 2020-05-16 17:05:37 -07:00
byte-run.el Merge from origin/emacs-27 2020-05-09 10:03:21 -07:00
bytecomp.el Update spill LAP machinery and compile anonymous lambdas 2020-05-14 21:50:31 +01:00
cconv.el Remove generation of old bytecodes for catch/unwind 2020-01-05 11:19:52 +01:00
chart.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
check-declare.el Use lexical-binding in check-declare.el and add tests 2020-05-03 19:50:57 +02:00
checkdoc.el Merge from origin/emacs-27 2020-04-20 07:50:19 -07:00
cl-extra.el Make cl-concatenate an alias of seq-concatenate 2020-03-23 18:58:21 -04:00
cl-generic.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
cl-indent.el Remove redundant :groups args missed in last commit 2020-05-03 16:21:51 +02:00
cl-lib.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
cl-macs.el Don't increment array index in cl-loop twice (Bug#40727) 2020-05-07 08:23:56 -04:00
cl-preloaded.el Fix copyright years by hand 2020-01-01 01:01:53 +00:00
cl-print.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
cl-seq.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
comp.el Improve handling of native compilation units still in use in Windows 2020-05-25 09:42:10 +01:00
copyright.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
crm.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
cursor-sensor.el * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Change last fix 2020-02-24 09:55:09 -05:00
debug.el * lisp/emacs-lisp/debug.el (debug): Merge the non-interactive cases 2020-01-31 16:09:42 +02:00
derived.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
disass.el set disassemble buffer in read only 2020-01-01 11:38:17 +01:00
easy-mmode.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
easymenu.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
edebug.el Fix bug #40992 whilst still allowing breakpoint highlights in edebug 2020-05-11 20:05:54 +00:00
eieio-base.el Revert "Inhibit modification hooks when saving eieio-persistent's" 2020-05-12 21:06:22 +02:00
eieio-compat.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
eieio-core.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
eieio-custom.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
eieio-datadebug.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
eieio-opt.el Replace add-hook load-hook with with-eval-after-load 2020-01-16 21:21:29 -08:00
eieio-speedbar.el Replace add-hook load-hook with with-eval-after-load 2020-01-16 21:21:29 -08:00
eieio.el * lisp/emacs-lisp/eieio.el (eieio pcase macro): Fix last-minute typo 2020-05-10 16:17:16 -04:00
eldoc.el Turn Eldoc, Xref and Project into GNU ELPA :core packages 2020-05-13 11:31:35 +01:00
elint.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
elp.el ; Fix some typos and doc issues (bug#40695) 2020-04-18 17:10:02 +02:00
ert-x.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ert.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ewoc.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
faceup.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
find-func.el Merge remote-tracking branch 'savannah/master' into HEAD 2020-04-03 19:06:57 +01:00
float-sup.el Use lexical-binding in float-sup.el and add tests 2020-04-29 09:25:02 +02:00
generator.el Merge from origin/emacs-27 2020-04-20 07:50:19 -07:00
generic.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
gv.el Merge from origin/emacs-27 2020-04-20 07:50:19 -07:00
helper.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
inline.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
let-alist.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
lisp-mnt.el Globally sanitize single-file package long descriptions (Bug#37548) 2020-01-23 22:57:23 +01:00
lisp-mode.el Add lisp-data-mode for editing non-code Lisp data 2020-05-01 12:11:10 +01:00
lisp.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
macroexp.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
map-ynp.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
map.el * lisp/emacs-lisp/map.el: Add keyword-only pattern abbreviation 2020-02-04 12:30:31 -05:00
nadvice.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
package-x.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
package.el Improve handling of native compilation units still in use in Windows 2020-05-25 09:42:10 +01:00
pcase.el * lisp/emacs-lisp/pcase.el (pcase--fgrep): Look inside vectors 2020-05-11 09:53:37 -04:00
pp.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
radix-tree.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
re-builder.el Fix void-variable n-reb in re-builder (Bug#40409) 2020-04-04 20:06:54 -04:00
regexp-opt.el Remove the optional KEEP-ORDER argument to regexp-opt 2020-02-13 20:43:42 +01:00
regi.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ring.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
rmc.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
rx.el Fix rx error with ? and ?? 2020-03-05 12:55:54 +01:00
seq.el ; lisp/emacs-lisp/seq.el: Explain why we don't use cl-lib here 2020-03-07 18:45:23 -05:00
shadow.el Fix edge case errors in filename-matching regexps 2020-04-14 12:25:16 +02:00
smie.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
subr-x.el gnus-shorten-url: Improve and avoid args-out-of-range error 2020-04-13 12:12:00 +02:00
syntax.el Allow back-references in syntax-propertize-rules. 2020-05-19 20:50:14 +02:00
tabulated-list.el Move “Fix some broken conditional forms” to master 2020-01-05 11:50:31 -08:00
tcover-ses.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
tcover-unsafep.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
testcover.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
text-property-search.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
thunk.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
timer-list.el Support sorting timer-list-mode by column (Bug#40854) 2020-05-12 19:10:20 +02:00
timer.el Simplify run-at-time 2020-03-08 00:25:38 -08:00
tq.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
trace.el Clarify semantics of trace-function CONTEXT argument 2020-04-25 09:55:37 -04:00
unsafep.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
warnings.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00