rogue4: prevent segfault on getpwuid failure

This commit is contained in:
John "Elwin" Edwards 2009-11-24 12:53:15 +00:00
parent ab5d57406c
commit 3f546ef2eb
2 changed files with 15 additions and 6 deletions

View file

@ -120,7 +120,8 @@ setup()
#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