Path: utzoo!attcan!uunet!mcsun!hp4nl!tuegate.tue.nl!wzv!wietse From: wietse@wzv.win.tue.nl (Wietse Z. Venema) Newsgroups: comp.sources.games.bugs Subject: Avoiding Nethack core dumps (Re: NetHack 3.0 problems) Message-ID: <648@wzv.win.tue.nl> Date: 13 Apr 90 21:30:29 GMT References: <1990Apr10.001233.1080@mccc.uucp> Sender: wietse@wzv.win.tue.nl (Wietse Z. Venema) Organization: Eindhoven University of Technology, The Netherlands Lines: 12 shevett@mccc.uucp (Dave Shevett) writes: >Is there any 'quick and dirty' thing to stop [core dumps] from happening? Yes there is, and most of the required code is already part of the program. In order to survive imminent core dumps, just add a few lines with (void) signal(SIGSEGV, (SIG_RET_TYPE) hangup); (void) signal(SIGBUS, (SIG_RET_TYPE) hangup); near the `signal(SIGHUP, (SIG_RET_TYPE) hangup);' statement. The change causes the program to save the game and terminate cleanly, instead of dumping core.