1 /* Set up the signal behavior. */
26 extern VOID
sig_die();
29 extern void sig_die(char*, int);
33 static VOID
sigfdie(Sigarg
)
36 sig_die("Floating Exception", 1);
40 static VOID
sigidie(Sigarg
)
43 sig_die("IOT Trap", 1);
47 static VOID
sigqdie(Sigarg
)
50 sig_die("Quit signal", 1);
55 static VOID
sigindie(Sigarg
)
58 sig_die("Interrupt", 0);
61 static VOID
sigtdie(Sigarg
)
68 static VOID
sigtrdie(Sigarg
)
71 sig_die("Trace trap", 1);
83 signal1(SIGFPE
, sigfdie
); /* ignore underflow, enable overflow */
85 signal1(SIGIOT
, sigidie
);
88 signal1(SIGTRAP
, sigtrdie
);
91 if(signal1(SIGQUIT
,sigqdie
) == SIG_IGN
)
92 signal1(SIGQUIT
, SIG_IGN
);
94 if(signal1(SIGINT
, sigindie
) == SIG_IGN
)
95 signal1(SIGINT
, SIG_IGN
);
96 signal1(SIGTERM
,sigtdie
);
99 ldfps(01200); /* detect overflow as an exception */