1988-04-29 14:38:36 +00:00
|
|
|
/*
|
|
|
|
(c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
|
1988-05-03 13:17:20 +00:00
|
|
|
/*
|
|
|
|
Module: initialization and some global vars
|
|
|
|
Author: Ceriel J.H. Jacobs
|
|
|
|
Version: $Header$
|
|
|
|
*/
|
|
|
|
|
1988-04-29 14:38:36 +00:00
|
|
|
#include <signal.h>
|
|
|
|
#include <em_abs.h>
|
|
|
|
#include <m2_traps.h>
|
|
|
|
|
|
|
|
/* map unix signals onto EM traps */
|
|
|
|
init()
|
|
|
|
{
|
|
|
|
sigtrp(M2_UNIXSIG, SIGHUP);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGINT);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGQUIT);
|
|
|
|
sigtrp(EILLINS, SIGILL);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGTRAP);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGIOT);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGEMT);
|
1990-12-03 13:54:36 +00:00
|
|
|
sigtrp(M2_UNIXSIG, SIGFPE);
|
1988-04-29 14:38:36 +00:00
|
|
|
sigtrp(M2_UNIXSIG, SIGBUS);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGSEGV);
|
|
|
|
sigtrp(EBADMON, SIGSYS);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGPIPE);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGALRM);
|
|
|
|
sigtrp(M2_UNIXSIG, SIGTERM);
|
|
|
|
}
|
1991-09-04 15:49:34 +00:00
|
|
|
#if defined(__em22) || defined(__em24) || defined(__em44)
|
1988-12-02 15:39:59 +00:00
|
|
|
killbss()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
|
|
|
|
static int blablabla; /* We cannot use end, because then also
|
|
|
|
bss allocated for the systemcall lib
|
|
|
|
would be overwritten. Lets hope that
|
|
|
|
this helps ...
|
|
|
|
*/
|
|
|
|
|
|
|
|
killbss()
|
|
|
|
{
|
1989-04-04 10:09:27 +00:00
|
|
|
extern char *bkillbss;
|
|
|
|
register char *p = (char *) &bkillbss;
|
1988-12-02 15:39:59 +00:00
|
|
|
|
|
|
|
while (p < (char *) &blablabla) *p++ = 0x66;
|
|
|
|
}
|
|
|
|
#endif
|
1988-05-03 12:44:32 +00:00
|
|
|
|
|
|
|
extern int catch();
|
|
|
|
|
|
|
|
int (*handler)() = catch;
|
1988-12-02 15:39:59 +00:00
|
|
|
char **argv = 0, **environ = 0;
|
1989-02-13 18:41:17 +00:00
|
|
|
int argc = 0;
|
|
|
|
char *MainLB = 0;
|