]> git.eshelyaron.com Git - emacs.git/commit
Improve checking of pdump load failures
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Sep 2019 18:26:07 +0000 (11:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Sep 2019 18:27:14 +0000 (11:27 -0700)
commit5fafa40d076ee24baf880e97d4290b6196cf838a
tree03452b023e9777409d979932b53f9ef347601b76
parenta6daae7b3df3a964b3dcde85987c02fd0af66a89
Improve checking of pdump load failures

* src/alloc.c (memory_full): Just report "memory exhausted" if
failure occurs during initialization, since fancier recovery
schemes are not likely to work when not initialized.
* src/emacs.c (dump_error_to_string): Accept int, not enum
pdumper_load_result, since the result might not fit in the
enum.  Use strerror if it was derived from errno.  This is for
better diagnostics of pdump load failures.
(load_pdump_find_executable): Return char *, not enum.  2nd
arg is now pointer to buffer size, rather than pointer to
pointer to buffer.  All callers changed.  Use Emacs allocator
since they should now be OK even during early startup.
Use check_executable instead access, to use effective rather
than real permissions.
(load_pdump): Return void since callers ignore result.
Use int where enum could be too narrow.  Use heap rather
than stack for possibly-long string.  Prefer ptrdiff_t to
size_t.
* src/fileio.c (check_executable): Now extern.
* src/pdumper.c (pdumper_load): Return int that may have
errno added to it, for better diagnostics when loads fail.
src/alloc.c
src/emacs.c
src/fileio.c
src/lisp.h
src/pdumper.c
src/pdumper.h