diff urogue/main.c @ 272:1db299e868b8

UltraRogue: add the autosave feature. UltraRogue now automatically saves the game when SIGHUP or SIGTERM is received.
author John "Elwin" Edwards
date Sun, 03 Sep 2017 19:58:22 -0400
parents a413bc97d3ea
children 51ddbe7b992d
line wrap: on
line diff
--- a/urogue/main.c	Sun Mar 05 20:14:11 2017 -0500
+++ b/urogue/main.c	Sun Sep 03 19:58:22 2017 -0400
@@ -197,6 +197,8 @@
 												  
     food_left = (int) (food_left * scale);
 
+    md_onsignal_autosave();
+
     /* Set up windows */
 
     cw = newwin(LINES, COLS, 0, 0);
@@ -272,6 +274,12 @@
     exit(100);
 }
 
+void
+fatal_handler(int sig)
+{
+    fatal("");
+}
+
 /*
     rnd()
         Pick a very random number.