0N/A/*
1472N/A * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
0N/Apackage sun.jvm.hotspot.runtime.linux;
0N/A
0N/Apublic class LinuxSignals {
0N/A private static String[] signalNames = {
0N/A "", /* No signal 0 */
0N/A "SIGHUP", /* hangup */
0N/A "SIGINT", /* interrupt (rubout) */
0N/A "SIGQUIT", /* quit (ASCII FS) */
0N/A "SIGILL", /* illegal instruction (not reset when caught) */
0N/A "SIGTRAP", /* trace trap (not reset when caught) */
0N/A "SIGABRT", /* used by abort, replace SIGIOT in the future */
0N/A "SIGIOT",
0N/A "SIGBUS",
0N/A "SIGFPE", /* floating point exception */
0N/A "SIGKILL", /* kill (cannot be caught or ignored) */
0N/A "SIGUSR1", /* user defined signal 1 */
0N/A "SIGSEGV", /* segmentation violation */
0N/A "SIGUSR2", /* user defined signal 2 */
0N/A "SIGPIPE", /* write on a pipe with no one to read it */
0N/A "SIGALRM", /* alarm clock */
0N/A "SIGTERM", /* software termination signal from kill */
0N/A "SIGSTKFLT",
0N/A "SIGCHLD", /* child status change alias */
0N/A "SIGCONT", /* stopped process has been continued */
0N/A "SIGSTOP", /* stop (cannot be caught or ignored) */
0N/A "SIGTSTP", /* user stop requested from tty */
0N/A "SIGTTIN", /* background tty read attempted */
0N/A "SIGTTOU", /* background tty write attempted */
0N/A "SIGURG", /* urgent socket condition */
0N/A "SIGXCPU", /* exceeded cpu limit */
0N/A "SIGXFSZ", /* exceeded file size limit */
0N/A "SIGVTALRM", /* virtual timer expired */
0N/A "SIGPROF", /* profiling timer expired */
0N/A "SIGWINCH", /* window size change */
0N/A "SIGPOLL", /* pollable event occured */
0N/A "SIGPWR", /* power-fail restart */
0N/A "SIGSYS"
0N/A };
0N/A
0N/A public static String getSignalName(int sigNum) {
0N/A if ((sigNum <= 0) || (sigNum >= signalNames.length)) {
0N/A // Probably best to fail in a non-destructive way
0N/A return "<Error: Illegal signal number " + sigNum + ">";
0N/A }
0N/A return signalNames[sigNum];
0N/A }
0N/A}