diff rogue4/mach_dep.c @ 23:107a467612fb

rogue4: prevent segfault on getpwuid failure
author edwarj4
date Tue, 24 Nov 2009 12:53:15 +0000
parents 63b9fd7d70ce
children ea7372f5d314
line wrap: on
line diff
--- a/rogue4/mach_dep.c	Mon Nov 16 23:54:24 2009 +0000
+++ b/rogue4/mach_dep.c	Tue Nov 24 12:53:15 2009 +0000
@@ -120,7 +120,8 @@
 #ifdef SIGBUS
     signal(SIGBUS, auto_save);
 #endif
-    signal(SIGSEGV, auto_save);
+    /* Don't bother saving a game that segfaulted. */
+    signal(SIGSEGV, SIG_DFL);
 #ifdef SIGSYS
     signal(SIGSYS, auto_save);
 #endif