Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 36997 invoked from network); 19 Aug 2009 08:55:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Aug 2009 08:55:44 -0000 Received: (qmail 96243 invoked by uid 500); 19 Aug 2009 08:56:03 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 96139 invoked by uid 500); 19 Aug 2009 08:56:03 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 96129 invoked by uid 99); 19 Aug 2009 08:56:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 08:56:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2009 08:56:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 40D7F23888E5; Wed, 19 Aug 2009 08:55:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r805707 - /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Signal.java Date: Wed, 19 Aug 2009 08:55:41 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090819085541.40D7F23888E5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturk Date: Wed Aug 19 08:55:40 2009 New Revision: 805707 URL: http://svn.apache.org/viewvc?rev=805707&view=rev Log: Dummy Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Signal.java Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Signal.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Signal.java?rev=805707&view=auto ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Signal.java (added) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Signal.java Wed Aug 19 08:55:40 2009 @@ -0,0 +1,113 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.commons.runtime; + +/** + * Posix signals enumeration. + */ +public enum Signal +{ + + /** Unknown signal */ + UNKNOWN( 0), + /** Hangup (POSIX). */ + SIGHUP( 1), + /** Interrupt (ANSI). */ + SIGINT( 2), + /** Quit (POSIX). */ + SIGQUIT( 3), + /** Illegal instruction (ANSI). */ + SIGILL( 4), + /** Trace trap (POSIX). */ + SIGTRAP( 5), + /** Abort (ANSI). */ + SIGABRT( 6), + /** IOT trap (4.2 BSD). */ + SIGIOT( 6), + /** BUS error (4.2 BSD). */ + SIGBUS( 7), + /** Floating-point exception (ANSI). */ + SIGFPE( 8), + /** Kill, unblockable (POSIX). */ + SIGKILL( 9), + /** User-defined signal 1 (POSIX). */ + SIGUSR1( 10), + /** Segmentation violation (ANSI). */ + SIGSEGV( 11), + /** User-defined signal 2 (POSIX). */ + SIGUSR2( 12), + /** Broken pipe (POSIX). */ + SIGPIPE( 13), + /** Alarm clock (POSIX). */ + SIGALRM( 14), + /** Termination (ANSI). */ + SIGTERM( 15), + /** Stack fault. */ + SIGSTKFLT( 16), + /** Child status has changed (POSIX). */ + SIGCHLD( 17), + /** Continue (POSIX). */ + SIGCONT( 18), + /** Stop, unblockable (POSIX). */ + SIGSTOP( 19), + /** Keyboard stop (POSIX). */ + SIGTSTP( 20), + /** Background read from tty (POSIX). */ + SIGTTIN( 21), + /** Background write to tty (POSIX). */ + SIGTTOU( 22), + /** Urgent condition on socket (4.2 BSD). */ + SIGURG( 23), + /** CPU limit exceeded (4.2 BSD). */ + SIGXCPU( 24), + /** File size limit exceeded (4.2 BSD). */ + SIGXFSZ( 25), + /** Virtual alarm clock (4.2 BSD). */ + SIGVTALRM( 26), + /** Profiling alarm clock (4.2 BSD). */ + SIGPROF( 27), + /** Window size change (4.3 BSD, Sun). */ + SIGWINCH( 28), + /** I/O now possible (4.2 BSD). */ + SIGIO( 29), + /** Power failure restart (System V). */ + SIGPWR( 30), + /** Bad system call. */ + SIGSYS( 31); + + + private int value; + private Signal(int v) + { + value = v; + } + + public int valueOf() + { + return value; + } + + public static Signal valueOf(int value) + { + for (Signal e : values()) { + if (e.value == value) + return e; + } + return UNKNOWN; + } + +}