aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 158d2f73eec..0e9a6826005 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1678,6 +1678,25 @@ deliver_arith_signal (int sig)
1678 deliver_thread_signal (sig, handle_arith_signal); 1678 deliver_thread_signal (sig, handle_arith_signal);
1679} 1679}
1680 1680
1681#ifdef SIGDANGER
1682
1683/* Handler for SIGDANGER. */
1684static void
1685handle_danger_signal (int sig)
1686{
1687 malloc_warning ("Operating system warns that virtual memory is running low.\n");
1688
1689 /* It might be unsafe to call do_auto_save now. */
1690 force_auto_save_soon ();
1691}
1692
1693static void
1694deliver_danger_signal (int sig)
1695{
1696 deliver_process_signal (sig, handle_danger_signal);
1697}
1698#endif
1699
1681/* Treat SIG as a terminating signal, unless it is already ignored and 1700/* Treat SIG as a terminating signal, unless it is already ignored and
1682 we are in --batch mode. Among other things, this makes nohup work. */ 1701 we are in --batch mode. Among other things, this makes nohup work. */
1683static void 1702static void