hangup() cleanup; SIGXCPU handling

This commit is contained in:
nethack.rankin
2007-01-09 05:29:17 +00:00
parent 1c20fe6223
commit f2d8a53718
7 changed files with 60 additions and 49 deletions

View File

@@ -122,7 +122,7 @@ char *argv[];
/* used to clear hangup stuff while still giving standard traceback */
VAXC$ESTABLISH(vms_handler);
#endif
(void) signal(SIGHUP, (SIG_RET_TYPE) hangup);
sethanguphandler(hangup);
process_options(argc, argv); /* command line options */
@@ -389,8 +389,8 @@ byebye()
extern unsigned long FDECL(sys$delprc,(unsigned long *,const genericptr_t));
/* clean up any subprocess we've spawned that may still be hanging around */
if (dosh_pid) (void) sys$delprc(&dosh_pid, 0), dosh_pid = 0;
if (mail_pid) (void) sys$delprc(&mail_pid, 0), mail_pid = 0;
if (dosh_pid) (void) sys$delprc(&dosh_pid, (genericptr_t)0), dosh_pid = 0;
if (mail_pid) (void) sys$delprc(&mail_pid, (genericptr_t)0), mail_pid = 0;
#endif
/* SIGHUP doesn't seem to do anything on VMS, so we fudge it here... */
@@ -429,6 +429,13 @@ genericptr_t sigargs, mechargs; /* [0] is argc, [1..argc] are the real args */
}
#endif
void
sethanguphandler(handler)
void FDECL((*handler), (int));
{
(void)signal(SIGHUP, (SIG_RET_TYPE)handler);
}
#ifdef PORT_HELP
void
port_help()