1998-05-22 18:32:18 +08:00
|
|
|
/* Set up the signal behavior. */
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "signal1.h"
|
|
|
|
|
|
|
|
#ifndef SIGIOT
|
|
|
|
#ifdef SIGABRT
|
|
|
|
#define SIGIOT SIGABRT
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2002-06-01 20:38:32 +08:00
|
|
|
extern void sig_die (char *, int);
|
1998-05-22 18:32:18 +08:00
|
|
|
|
g2c.hin, [...]: Kill VOID, Void and Int.
* g2c.hin, libF77/d_cnjg.c, libF77/main.c, libF77/r_cnjg.c,
libF77/s_cat.c, libF77/s_paus.c, libF77/s_rnge.c, libF77/setarg.c,
libF77/setsig.c, libF77/signal1.h0, libI77/dfe.c, libI77/due.c,
libI77/err.c, libI77/fio.h, libI77/fmt.c, libI77/iio.c,
libI77/ilnw.c, libI77/lread.c, libI77/lwrite.c, libI77/rsfe.c,
libI77/rsli.c, libI77/rsne.c, libI77/sfe.c, libI77/sue.c,
libI77/util.c, libI77/wrtfmt.c, libI77/wsfe.c, libI77/wsle.c,
libI77/xwsne.c, libU77/date_.c: Kill VOID, Void and Int.
From-SVN: r54134
2002-06-01 09:58:10 +08:00
|
|
|
static void
|
2002-06-01 20:38:32 +08:00
|
|
|
sigfdie (Sigarg)
|
1998-05-22 18:32:18 +08:00
|
|
|
{
|
2002-06-01 20:38:32 +08:00
|
|
|
Use_Sigarg;
|
|
|
|
sig_die ("Floating Exception", 1);
|
1998-05-22 18:32:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
g2c.hin, [...]: Kill VOID, Void and Int.
* g2c.hin, libF77/d_cnjg.c, libF77/main.c, libF77/r_cnjg.c,
libF77/s_cat.c, libF77/s_paus.c, libF77/s_rnge.c, libF77/setarg.c,
libF77/setsig.c, libF77/signal1.h0, libI77/dfe.c, libI77/due.c,
libI77/err.c, libI77/fio.h, libI77/fmt.c, libI77/iio.c,
libI77/ilnw.c, libI77/lread.c, libI77/lwrite.c, libI77/rsfe.c,
libI77/rsli.c, libI77/rsne.c, libI77/sfe.c, libI77/sue.c,
libI77/util.c, libI77/wrtfmt.c, libI77/wsfe.c, libI77/wsle.c,
libI77/xwsne.c, libU77/date_.c: Kill VOID, Void and Int.
From-SVN: r54134
2002-06-01 09:58:10 +08:00
|
|
|
static void
|
2002-06-01 20:38:32 +08:00
|
|
|
sigidie (Sigarg)
|
1998-05-22 18:32:18 +08:00
|
|
|
{
|
2002-06-01 20:38:32 +08:00
|
|
|
Use_Sigarg;
|
|
|
|
sig_die ("IOT Trap", 1);
|
1998-05-22 18:32:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef SIGQUIT
|
g2c.hin, [...]: Kill VOID, Void and Int.
* g2c.hin, libF77/d_cnjg.c, libF77/main.c, libF77/r_cnjg.c,
libF77/s_cat.c, libF77/s_paus.c, libF77/s_rnge.c, libF77/setarg.c,
libF77/setsig.c, libF77/signal1.h0, libI77/dfe.c, libI77/due.c,
libI77/err.c, libI77/fio.h, libI77/fmt.c, libI77/iio.c,
libI77/ilnw.c, libI77/lread.c, libI77/lwrite.c, libI77/rsfe.c,
libI77/rsli.c, libI77/rsne.c, libI77/sfe.c, libI77/sue.c,
libI77/util.c, libI77/wrtfmt.c, libI77/wsfe.c, libI77/wsle.c,
libI77/xwsne.c, libU77/date_.c: Kill VOID, Void and Int.
From-SVN: r54134
2002-06-01 09:58:10 +08:00
|
|
|
static void
|
2002-06-01 20:38:32 +08:00
|
|
|
sigqdie (Sigarg)
|
1998-05-22 18:32:18 +08:00
|
|
|
{
|
2002-06-01 20:38:32 +08:00
|
|
|
Use_Sigarg;
|
|
|
|
sig_die ("Quit signal", 1);
|
1998-05-22 18:32:18 +08:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
g2c.hin, [...]: Kill VOID, Void and Int.
* g2c.hin, libF77/d_cnjg.c, libF77/main.c, libF77/r_cnjg.c,
libF77/s_cat.c, libF77/s_paus.c, libF77/s_rnge.c, libF77/setarg.c,
libF77/setsig.c, libF77/signal1.h0, libI77/dfe.c, libI77/due.c,
libI77/err.c, libI77/fio.h, libI77/fmt.c, libI77/iio.c,
libI77/ilnw.c, libI77/lread.c, libI77/lwrite.c, libI77/rsfe.c,
libI77/rsli.c, libI77/rsne.c, libI77/sfe.c, libI77/sue.c,
libI77/util.c, libI77/wrtfmt.c, libI77/wsfe.c, libI77/wsle.c,
libI77/xwsne.c, libU77/date_.c: Kill VOID, Void and Int.
From-SVN: r54134
2002-06-01 09:58:10 +08:00
|
|
|
static void
|
2002-06-01 20:38:32 +08:00
|
|
|
sigindie (Sigarg)
|
1998-05-22 18:32:18 +08:00
|
|
|
{
|
2002-06-01 20:38:32 +08:00
|
|
|
Use_Sigarg;
|
|
|
|
sig_die ("Interrupt", 0);
|
1998-05-22 18:32:18 +08:00
|
|
|
}
|
|
|
|
|
g2c.hin, [...]: Kill VOID, Void and Int.
* g2c.hin, libF77/d_cnjg.c, libF77/main.c, libF77/r_cnjg.c,
libF77/s_cat.c, libF77/s_paus.c, libF77/s_rnge.c, libF77/setarg.c,
libF77/setsig.c, libF77/signal1.h0, libI77/dfe.c, libI77/due.c,
libI77/err.c, libI77/fio.h, libI77/fmt.c, libI77/iio.c,
libI77/ilnw.c, libI77/lread.c, libI77/lwrite.c, libI77/rsfe.c,
libI77/rsli.c, libI77/rsne.c, libI77/sfe.c, libI77/sue.c,
libI77/util.c, libI77/wrtfmt.c, libI77/wsfe.c, libI77/wsle.c,
libI77/xwsne.c, libU77/date_.c: Kill VOID, Void and Int.
From-SVN: r54134
2002-06-01 09:58:10 +08:00
|
|
|
static void
|
2002-06-01 20:38:32 +08:00
|
|
|
sigtdie (Sigarg)
|
1998-05-22 18:32:18 +08:00
|
|
|
{
|
2002-06-01 20:38:32 +08:00
|
|
|
Use_Sigarg;
|
|
|
|
sig_die ("Killed", 0);
|
1998-05-22 18:32:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef SIGTRAP
|
g2c.hin, [...]: Kill VOID, Void and Int.
* g2c.hin, libF77/d_cnjg.c, libF77/main.c, libF77/r_cnjg.c,
libF77/s_cat.c, libF77/s_paus.c, libF77/s_rnge.c, libF77/setarg.c,
libF77/setsig.c, libF77/signal1.h0, libI77/dfe.c, libI77/due.c,
libI77/err.c, libI77/fio.h, libI77/fmt.c, libI77/iio.c,
libI77/ilnw.c, libI77/lread.c, libI77/lwrite.c, libI77/rsfe.c,
libI77/rsli.c, libI77/rsne.c, libI77/sfe.c, libI77/sue.c,
libI77/util.c, libI77/wrtfmt.c, libI77/wsfe.c, libI77/wsle.c,
libI77/xwsne.c, libU77/date_.c: Kill VOID, Void and Int.
From-SVN: r54134
2002-06-01 09:58:10 +08:00
|
|
|
static void
|
2002-06-01 20:38:32 +08:00
|
|
|
sigtrdie (Sigarg)
|
1998-05-22 18:32:18 +08:00
|
|
|
{
|
2002-06-01 20:38:32 +08:00
|
|
|
Use_Sigarg;
|
|
|
|
sig_die ("Trace trap", 1);
|
1998-05-22 18:32:18 +08:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2002-06-01 20:38:32 +08:00
|
|
|
void
|
|
|
|
f_setsig ()
|
1998-05-22 18:32:18 +08:00
|
|
|
{
|
2002-06-01 20:38:32 +08:00
|
|
|
signal1 (SIGFPE, sigfdie); /* ignore underflow, enable overflow */
|
1998-05-22 18:32:18 +08:00
|
|
|
#ifdef SIGIOT
|
2002-06-01 20:38:32 +08:00
|
|
|
signal1 (SIGIOT, sigidie);
|
1998-05-22 18:32:18 +08:00
|
|
|
#endif
|
|
|
|
#ifdef SIGTRAP
|
2002-06-01 20:38:32 +08:00
|
|
|
signal1 (SIGTRAP, sigtrdie);
|
1998-05-22 18:32:18 +08:00
|
|
|
#endif
|
|
|
|
#ifdef SIGQUIT
|
2002-06-01 20:38:32 +08:00
|
|
|
if (signal1 (SIGQUIT, sigqdie) == SIG_IGN)
|
|
|
|
signal1 (SIGQUIT, SIG_IGN);
|
1998-05-22 18:32:18 +08:00
|
|
|
#endif
|
2002-06-01 20:38:32 +08:00
|
|
|
if (signal1 (SIGINT, sigindie) == SIG_IGN)
|
|
|
|
signal1 (SIGINT, SIG_IGN);
|
|
|
|
signal1 (SIGTERM, sigtdie);
|
1998-05-22 18:32:18 +08:00
|
|
|
|
|
|
|
#ifdef pdp11
|
2002-06-01 20:38:32 +08:00
|
|
|
ldfps (01200); /* detect overflow as an exception */
|
1998-05-22 18:32:18 +08:00
|
|
|
#endif
|
|
|
|
}
|