source: trunk/minix/lib/ack/libm2/init.c@ 12

Last change on this file since 12 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.1 KB
Line 
1/*
2 (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 See the copyright notice in the ACK home directory, in the file "Copyright".
4*/
5
6/*
7 Module: initialization and some global vars
8 Author: Ceriel J.H. Jacobs
9 Version: $Header: /cvsup/minix/src/lib/ack/libm2/init.c,v 1.2 2006/02/17 14:12:47 philip Exp $
10*/
11
12#include <signal.h>
13#include <em_abs.h>
14#include <m2_traps.h>
15
16/* map unix signals onto EM traps */
17init()
18{
19 sigtrp(M2_UNIXSIG, SIGHUP);
20 sigtrp(M2_UNIXSIG, SIGINT);
21 sigtrp(M2_UNIXSIG, SIGQUIT);
22 sigtrp(EILLINS, SIGILL);
23 sigtrp(M2_UNIXSIG, SIGTRAP);
24#ifdef SIGIOT
25 sigtrp(M2_UNIXSIG, SIGIOT);
26#endif
27#if SIGEMT
28 sigtrp(M2_UNIXSIG, SIGEMT);
29#endif
30 sigtrp(M2_UNIXSIG, SIGFPE);
31 sigtrp(M2_UNIXSIG, SIGBUS);
32 sigtrp(M2_UNIXSIG, SIGSEGV);
33#ifdef SIGSYS
34 sigtrp(EBADMON, SIGSYS);
35#endif
36 sigtrp(M2_UNIXSIG, SIGPIPE);
37 sigtrp(M2_UNIXSIG, SIGALRM);
38 sigtrp(M2_UNIXSIG, SIGTERM);
39}
40
41killbss()
42{
43 /* Fill bss with junk? Make lots of VM pages dirty? No way! */
44}
45
46extern int catch();
47
48int (*handler)() = catch;
49char **argv;
50int argc;
51char *MainLB;
Note: See TracBrowser for help on using the repository browser.