aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2013-01-10 23:47:57 -0800
committerPaul Eggert2013-01-10 23:47:57 -0800
commitb6f960a0ea4a19ed3dc8a6c5e34cf1d2e02b4bb9 (patch)
tree88deeaa8a3185157914c8ad160ca50db15689048 /src
parentfb6ea014512973f2e8d291b2f6672fbb56c3fe61 (diff)
downloademacs-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')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/emacs.c19
-rw-r--r--src/sysdep.c19
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 @@
12013-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
12013-01-05 Eli Zaretskii <eliz@gnu.org> 72013-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. */
353static void
354handle_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
362static void
363deliver_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. */
1669static void
1670handle_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
1678static void
1679deliver_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. */
1668static void 1687static void