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 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