* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: signals.c
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
#pragma ident "@(#)signals.c 1.6 06/08/31 SMI"
static void exit_handler(int);
static void hup_handler(int);
static void poll_handler(int);
* Default signal settings for the main LWP
* typically these two delivered as a result of terminal
signal(SIGPOLL
, poll_handler
);
signal(SIGHUP
, hup_handler
);
signal(SIGINT
, exit_handler
);
signal(SIGILL
, exit_handler
);
signal(SIGIOT
, exit_handler
);
signal(SIGFPE
, exit_handler
);
#if !defined(HOST_OS_LINUX)
signal(SIGEMT
, exit_handler
);
signal(SIGBUS
, exit_handler
);
signal(SIGSEGV
, exit_handler
);
signal(SIGSYS
, exit_handler
);
strp
= "Illegal Instruction";
strp
= "Segmentation violation";
#if !defined(HOST_OS_LINUX)
strp
= "Numeric Exception (Divide by Zero?)";
strp
= "Bad System Call Argument";
fprintf(stderr
, "SIGNAL: %s\n", strp
);
fprintf(stderr
, "SIGNAL: Unknown signal %d\n", sig
);
fprintf(stderr
, "Hup !\n");
fprintf(stderr
, "Poll !\n");