; Add entry to MAINTAINERS
[emacs.git] / src / unexsol.c
blob0f84099d39e3e3f96bb180c07cf1e3810f3a1693
1 /* Trivial unexec for Solaris. */
3 #include <config.h>
4 #include "unexec.h"
6 #include <dlfcn.h>
8 #include "lisp.h"
9 #include "buffer.h"
10 #include "coding.h"
12 void
13 unexec (const char *new_name, const char *old_name)
15 Lisp_Object data;
16 Lisp_Object errstring;
18 if (! dldump (0, new_name, RTLD_MEMORY))
19 return;
21 data = list1 (build_string (new_name));
22 synchronize_system_messages_locale ();
23 errstring = code_convert_string_norecord (build_string (dlerror ()),
24 Vlocale_coding_system, 0);
26 xsignal (Qfile_error,
27 Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));