diff options
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/emacs.c | 19 | ||||
| -rw-r--r-- | src/sysdep.c | 19 |
3 files changed, 25 insertions, 19 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 919e9e7de43..696a70fc08d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-01-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix SIGDANGER handlers, for AIX (Bug#13408). | ||
| 4 | * sysdep.c.c (handle_danger_signal, deliver_danger_signal) [SIGDANGER]: | ||
| 5 | Move handlers here from emacs.c; they were out of place. | ||
| 6 | |||
| 1 | 2013-01-05 Eli Zaretskii <eliz@gnu.org> | 7 | 2013-01-05 Eli Zaretskii <eliz@gnu.org> |
| 2 | 8 | ||
| 3 | * xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead | 9 | * xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead |
diff --git a/src/emacs.c b/src/emacs.c index a7b17a9905c..c0c230ef3dd 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -346,25 +346,6 @@ terminate_due_to_signal (int sig, int backtrace_limit) | |||
| 346 | /* This shouldn't be executed, but it prevents a warning. */ | 346 | /* This shouldn't be executed, but it prevents a warning. */ |
| 347 | exit (1); | 347 | exit (1); |
| 348 | } | 348 | } |
| 349 | |||
| 350 | #ifdef SIGDANGER | ||
| 351 | |||
| 352 | /* Handler for SIGDANGER. */ | ||
| 353 | static void | ||
| 354 | handle_danger_signal (int sig) | ||
| 355 | { | ||
| 356 | malloc_warning ("Operating system warns that virtual memory is running low.\n"); | ||
| 357 | |||
| 358 | /* It might be unsafe to call do_auto_save now. */ | ||
| 359 | force_auto_save_soon (); | ||
| 360 | } | ||
| 361 | |||
| 362 | static void | ||
| 363 | deliver_danger_signal (int sig) | ||
| 364 | { | ||
| 365 | deliver_process_signal (sig, handle_danger_signal); | ||
| 366 | } | ||
| 367 | #endif | ||
| 368 | 349 | ||
| 369 | /* Code for dealing with Lisp access to the Unix command line. */ | 350 | /* Code for dealing with Lisp access to the Unix command line. */ |
| 370 | 351 | ||
diff --git a/src/sysdep.c b/src/sysdep.c index 960c13b8d84..47a14bdba35 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -1663,6 +1663,25 @@ deliver_arith_signal (int sig) | |||
| 1663 | deliver_thread_signal (sig, handle_arith_signal); | 1663 | deliver_thread_signal (sig, handle_arith_signal); |
| 1664 | } | 1664 | } |
| 1665 | 1665 | ||
| 1666 | #ifdef SIGDANGER | ||
| 1667 | |||
| 1668 | /* Handler for SIGDANGER. */ | ||
| 1669 | static void | ||
| 1670 | handle_danger_signal (int sig) | ||
| 1671 | { | ||
| 1672 | malloc_warning ("Operating system warns that virtual memory is running low.\n"); | ||
| 1673 | |||
| 1674 | /* It might be unsafe to call do_auto_save now. */ | ||
| 1675 | force_auto_save_soon (); | ||
| 1676 | } | ||
| 1677 | |||
| 1678 | static void | ||
| 1679 | deliver_danger_signal (int sig) | ||
| 1680 | { | ||
| 1681 | deliver_process_signal (sig, handle_danger_signal); | ||
| 1682 | } | ||
| 1683 | #endif | ||
| 1684 | |||
| 1666 | /* Treat SIG as a terminating signal, unless it is already ignored and | 1685 | /* Treat SIG as a terminating signal, unless it is already ignored and |
| 1667 | we are in --batch mode. Among other things, this makes nohup work. */ | 1686 | we are in --batch mode. Among other things, this makes nohup work. */ |
| 1668 | static void | 1687 | static void |