2796N/A/*
2796N/A * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
2796N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2796N/A *
2796N/A * This code is free software; you can redistribute it and/or modify it
2796N/A * under the terms of the GNU General Public License version 2 only, as
2796N/A * published by the Free Software Foundation.
2796N/A *
2796N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2796N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2796N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2796N/A * version 2 for more details (a copy is included in the LICENSE file that
2796N/A * accompanied this code).
2796N/A *
2796N/A * You should have received a copy of the GNU General Public License version
2796N/A * 2 along with this work; if not, write to the Free Software Foundation,
2796N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2796N/A *
2796N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2796N/A * or visit www.oracle.com if you need additional information or have any
2796N/A * questions.
2796N/A *
2796N/A */
2796N/A
2796N/Apackage sun.jvm.hotspot.runtime.bsd_x86;
2796N/A
2796N/Apublic class BsdSignals {
2796N/A private static String[] signalNames = {
2796N/A "", /* No signal 0 */
2796N/A "SIGHUP", /* hangup */
2796N/A "SIGINT", /* interrupt */
2796N/A "SIGQUIT", /* quit */
2796N/A "SIGILL", /* illegal instr. (not reset when caught) */
2796N/A "SIGTRAP", /* trace trap (not reset when caught) */
2796N/A "SIGABRT", /* abort() */
2796N/A "SIGEMT", /* EMT instruction */
2796N/A "SIGFPE", /* floating point exception */
2796N/A "SIGKILL", /* kill (cannot be caught or ignored) */
2796N/A "SIGBUS", /* bus error */
2796N/A "SIGSEGV", /* segmentation violation */
2796N/A "SIGSYS", /* non-existent system call invoked */
2796N/A "SIGPIPE", /* write on a pipe with no one to read it */
2796N/A "SIGALRM", /* alarm clock */
2796N/A "SIGTERM", /* software termination signal from kill */
2796N/A "SIGURG", /* urgent condition on IO channel */
2796N/A "SIGSTOP", /* sendable stop signal not from tty */
2796N/A "SIGTSTP", /* stop signal from tty */
2796N/A "SIGCONT", /* continue a stopped process */
2796N/A "SIGCHLD", /* to parent on child stop or exit */
2796N/A "SIGTTIN", /* to readers pgrp upon background tty read */
2796N/A "SIGTTOU", /* like TTIN if (tp->t_local&LTOSTOP) */
2796N/A "SIGIO", /* input/output possible signal */
2796N/A "SIGXCPU", /* exceeded CPU time limit */
2796N/A "SIGXFSZ", /* exceeded file size limit */
2796N/A "SIGVTALRM", /* virtual time alarm */
2796N/A "SIGPROF", /* profiling time alarm */
2796N/A "SIGWINCH", /* window size changes */
2796N/A "SIGINFO", /* information request */
2796N/A "SIGUSR1", /* user defined signal 1 */
2796N/A "SIGUSR2" /* user defined signal 2 */
2796N/A };
2796N/A
2796N/A public static String getSignalName(int sigNum) {
2796N/A if ((sigNum <= 0) || (sigNum >= signalNames.length)) {
2796N/A // Probably best to fail in a non-destructive way
2796N/A return "<Error: Illegal signal number " + sigNum + ">";
2796N/A }
2796N/A return signalNames[sigNum];
2796N/A }
2796N/A}