Mercurial > hg > early-roguelike
comparison rogue3/mdport.c @ 7:d388234c4ce9
Don't autosave on segfault or after death
| author | edwarj4 | 
|---|---|
| date | Fri, 16 Oct 2009 14:40:16 +0000 | 
| parents | 9a2c0c60c386 | 
| children | e7dc901146f1 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 6:9a2c0c60c386 | 7:d388234c4ce9 | 
|---|---|
| 250 #endif | 250 #endif | 
| 251 #ifdef SIGBUS | 251 #ifdef SIGBUS | 
| 252 signal(SIGBUS, auto_save); | 252 signal(SIGBUS, auto_save); | 
| 253 #endif | 253 #endif | 
| 254 #ifdef SIGSEGV | 254 #ifdef SIGSEGV | 
| 255 signal(SIGSEGV, auto_save); | 255 /* If there's a segfault, the game state is probably trashed | 
| 256 and there's no point saving it. */ | |
| 257 signal(SIGSEGV, SIG_DFL); | |
| 256 #endif | 258 #endif | 
| 257 #ifdef SIGSYS | 259 #ifdef SIGSYS | 
| 258 signal(SIGSYS, auto_save); | 260 signal(SIGSYS, auto_save); | 
| 259 #endif | 261 #endif | 
| 260 #ifdef SIGTERM | 262 #ifdef SIGTERM | 
