hangup() cleanup; SIGXCPU handling
This commit is contained in:
@@ -178,7 +178,7 @@ done_hangup(sig) /* signal() handler */
|
||||
int sig;
|
||||
{
|
||||
program_state.done_hup++;
|
||||
(void)signal(SIGHUP, SIG_IGN);
|
||||
sethanguphandler((void FDECL((*),(int)))SIG_IGN);
|
||||
done_intr(sig);
|
||||
return;
|
||||
}
|
||||
@@ -662,7 +662,7 @@ die:
|
||||
(void) signal(SIGINT, (SIG_RET_TYPE) done_intr);
|
||||
# if defined(UNIX) || defined(VMS) || defined (__EMX__)
|
||||
(void) signal(SIGQUIT, (SIG_RET_TYPE) done_intr);
|
||||
(void) signal(SIGHUP, (SIG_RET_TYPE) done_hangup);
|
||||
sethanguphandler(done_hangup);
|
||||
# endif
|
||||
#endif /* NO_SIGNAL */
|
||||
|
||||
@@ -1034,6 +1034,11 @@ int status;
|
||||
dlb_cleanup();
|
||||
}
|
||||
|
||||
#ifdef VMS
|
||||
/* don't call exit() if already executing within an exit handler;
|
||||
that would cancel any other pending user-mode handlers */
|
||||
if (program_state.exiting) return;
|
||||
#endif
|
||||
nethack_exit(status);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user