root/src/unexsol.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. unexec

     1 /* Trivial unexec for Solaris.  */
     2 
     3 #include <config.h>
     4 #include "unexec.h"
     5 
     6 #include <dlfcn.h>
     7 
     8 #include "lisp.h"
     9 #include "buffer.h"
    10 #include "coding.h"
    11 
    12 void
    13 unexec (const char *new_name, const char *old_name)
    14 {
    15   Lisp_Object data;
    16   Lisp_Object errstring;
    17 
    18   if (! dldump (0, new_name, RTLD_MEMORY))
    19     return;
    20 
    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);
    25 
    26   xsignal (Qfile_error,
    27            Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
    28 }

/* [<][>][^][v][top][bottom][index][help] */