# HG changeset patch # User Richard M. Stallman # Date 756609313 0 # Node ID 3be757b02da0817011c318dc18a457f2a385af7f # Parent 4ae7453678af192165372ef49aef0e02aa9cfece (syms_of_emacs): Define Lisp var system-configuration. (memory_warning_signal): New function. (main): Handle SIGDANGER, if defined. diff -r 4ae7453678af -r 3be757b02da0 src/emacs.c --- a/src/emacs.c Thu Dec 23 01:13:02 1993 +0000 +++ b/src/emacs.c Thu Dec 23 01:15:13 1993 +0000 @@ -71,8 +71,11 @@ on subsequent starts. */ int initialized; -/* Variable whose value is symbol giving operating system type */ +/* Variable whose value is symbol giving operating system type. */ Lisp_Object Vsystem_type; + +/* Variable whose value is string giving configuration built for. */ +Lisp_Object Vsystem_configuration; /* If non-zero, emacs should not attempt to use an window-specific code, but instead should use the virtual terminal under which it was started */ @@ -151,6 +154,19 @@ kill (getpid (), fatal_error_code); #endif /* not VMS */ } + +#ifdef SIGDANGER + +/* Handle bus errors, illegal instruction, etc. */ +SIGTYPE +memory_warning_signal (sig) + int sig; +{ + signal (sig, memory_warning_signal); + + malloc_warning ("Operating system warns that virtual memory is running low.\n"); +} +#endif /* Code for dealing with Lisp access to the Unix command line */ @@ -447,8 +463,12 @@ signal (SIGXFSZ, fatal_error_signal); #endif /* SIGXFSZ */ +#ifdef SIGDANGER + /* This just means available memory is getting low. */ + signal (SIGDANGER, memory_warning_signal); +#endif + #ifdef AIX - signal (SIGDANGER, fatal_error_signal); signal (20, fatal_error_signal); signal (21, fatal_error_signal); signal (22, fatal_error_signal); @@ -897,6 +917,10 @@ "Value is symbol indicating type of operating system you are using."); Vsystem_type = intern (SYSTEM_TYPE); + DEFVAR_LISP ("system-configuration", &Vsystem_configuration, + "Value is string indicating configuration Emacs was built for."); + Vsystem_configuration = build_string (CONFIGURATION); + DEFVAR_BOOL ("noninteractive", &noninteractive1, "Non-nil means Emacs is running without interactive terminal.");