/* Fully extensible Emacs, running on Unix, intended for GNU.
-Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2012
- Free Software Foundation, Inc.
+Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2013 Free Software
+Foundation, Inc.
This file is part of GNU Emacs.
Lisp_Object Qrisky_local_variable;
Lisp_Object Qkill_emacs;
+static Lisp_Object Qkill_emacs_hook;
/* If true, Emacs should not attempt to use a window-specific code,
but instead should use the virtual terminal under which it was started. */
/* This shouldn't be executed, but it prevents a warning. */
exit (1);
}
-
-#ifdef SIGDANGER
-
-/* Handler for SIGDANGER. */
-static void
-handle_danger_signal (int sig)
-{
- malloc_warning ("Operating system warns that virtual memory is running low.\n");
-
- /* It might be unsafe to call do_auto_save now. */
- force_auto_save_soon ();
-}
-
-static void
-deliver_danger_signal (int sig)
-{
- deliver_process_signal (sig, handle_danger_signal);
-}
-#endif
\f
/* Code for dealing with Lisp access to the Unix command line. */
argv[skip_args] = fdStr;
- execv (argv[0], argv);
+ execvp (argv[0], argv);
fprintf (stderr, "emacs daemon: exec failed: %d\n", errno);
exit (1);
}
}
init_callproc (); /* Must follow init_cmdargs but not init_sys_modes. */
+ init_fileio ();
init_lread ();
#ifdef WINDOWSNT
/* Check to see if Emacs has been installed correctly. */
(Lisp_Object arg)
{
struct gcpro gcpro1;
- Lisp_Object hook;
int exit_code;
GCPRO1 (arg);
if (feof (stdin))
arg = Qt;
- hook = intern ("kill-emacs-hook");
- Frun_hooks (1, &hook);
-
+ /* Fsignal calls emacs_abort () if it sees that waiting_for_input is
+ set. */
+ waiting_for_input = 0;
+ Frun_hooks (1, &Qkill_emacs_hook);
UNGCPRO;
#ifdef HAVE_X_WINDOWS
{
char *path_copy = alloca (strlen (path) + 1);
strcpy (path_copy, path);
- dostounix_filename (path_copy);
+ dostounix_filename (path_copy, 0);
path = path_copy;
}
#endif
DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist");
DEFSYM (Qrisky_local_variable, "risky-local-variable");
DEFSYM (Qkill_emacs, "kill-emacs");
+ DEFSYM (Qkill_emacs_hook, "kill-emacs-hook");
#ifndef CANNOT_DUMP
defsubr (&Sdump_emacs);