diff options
| author | Paul Eggert | 2013-01-10 23:47:57 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-01-10 23:47:57 -0800 |
| commit | b6f960a0ea4a19ed3dc8a6c5e34cf1d2e02b4bb9 (patch) | |
| tree | 88deeaa8a3185157914c8ad160ca50db15689048 /src/sysdep.c | |
| parent | fb6ea014512973f2e8d291b2f6672fbb56c3fe61 (diff) | |
| download | emacs-b6f960a0ea4a19ed3dc8a6c5e34cf1d2e02b4bb9.tar.gz emacs-b6f960a0ea4a19ed3dc8a6c5e34cf1d2e02b4bb9.zip | |
Fix SIGDANGER handlers, for AIX.
* sysdep.c.c (handle_danger_signal, deliver_danger_signal) [SIGDANGER]:
Move handlers here from emacs.c; they were out of place.
Fixes: debbugs:13408
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 19 |
1 files changed, 19 insertions, 0 deletions
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 |