Print this page
    
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/lib/libc/port/gen/siglist.c
          +++ new/usr/src/lib/libc/port/gen/siglist.c
   1    1  /*
   2    2   * CDDL HEADER START
   3    3   *
   4    4   * The contents of this file are subject to the terms of the
   5    5   * Common Development and Distribution License (the "License").
   6    6   * You may not use this file except in compliance with the License.
   7    7   *
   8    8   * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9   * or http://www.opensolaris.org/os/licensing.
  10   10   * See the License for the specific language governing permissions
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   * Copyright 2015, Joyent, Inc.
  26   26   */
  27   27  
  28   28  /*      Copyright (c) 1988 AT&T */
  29   29  /*        All Rights Reserved   */
  30   30  
  31   31  /*
  32   32   * University Copyright- Copyright (c) 1982, 1986, 1988
  33   33   * The Regents of the University of California
  34   34   * All Rights Reserved
  35   35   *
  36   36   * University Acknowledgment- Portions of this document are derived from
  37   37   * software developed by the University of California, Berkeley, and its
  38   38   * contributors.
  39   39   */
  40   40  
  41   41  #include "lint.h"
  42   42  #include <sys/types.h>
  43   43  #include <signal.h>
  44   44  
  45   45  #undef  _sys_nsig
  46   46  #undef  _sys_siglist
  47   47  #define OLDNSIG 34
  48   48  
  49   49  const int _sys_nsig = OLDNSIG;
  50   50  
  51   51  static const char       STR_SIG_UNK[]   = "UNKNOWN SIGNAL";
  52   52  static const char       STR_SIGHUP[]    = "Hangup";
  53   53  static const char       STR_SIGINT[]    = "Interrupt";
  54   54  static const char       STR_SIGQUIT[]   = "Quit";
  55   55  static const char       STR_SIGILL[]    = "Illegal Instruction";
  56   56  static const char       STR_SIGTRAP[]   = "Trace/Breakpoint Trap";
  57   57  static const char       STR_SIGABRT[]   = "Abort";
  58   58  static const char       STR_SIGEMT[]    = "Emulation Trap";
  59   59  static const char       STR_SIGFPE[]    = "Arithmetic Exception";
  60   60  static const char       STR_SIGKILL[]   = "Killed";
  61   61  static const char       STR_SIGBUS[]    = "Bus Error";
  62   62  static const char       STR_SIGSEGV[]   = "Segmentation Fault";
  63   63  static const char       STR_SIGSYS[]    = "Bad System Call";
  64   64  static const char       STR_SIGPIPE[]   = "Broken Pipe";
  65   65  static const char       STR_SIGALRM[]   = "Alarm Clock";
  66   66  static const char       STR_SIGTERM[]   = "Terminated";
  67   67  static const char       STR_SIGUSR1[]   = "User Signal 1";
  68   68  static const char       STR_SIGUSR2[]   = "User Signal 2";
  69   69  static const char       STR_SIGCLD[]    = "Child Status Changed";
  70   70  static const char       STR_SIGPWR[]    = "Power-Fail/Restart";
  71   71  static const char       STR_SIGWINCH[]  = "Window Size Change";
  72   72  static const char       STR_SIGURG[]    = "Urgent Socket Condition";
  73   73  static const char       STR_SIGPOLL[]   = "Pollable Event";
  74   74  static const char       STR_SIGSTOP[]   = "Stopped (signal)";
  75   75  static const char       STR_SIGTSTP[]   = "Stopped (user)";
  76   76  static const char       STR_SIGCONT[]   = "Continued";
  77   77  static const char       STR_SIGTTIN[]   = "Stopped (tty input)";
  78   78  static const char       STR_SIGTTOU[]   = "Stopped (tty output)";
  79   79  static const char       STR_SIGVTALRM[] = "Virtual Timer Expired";
  80   80  static const char       STR_SIGPROF[]   = "Profiling Timer Expired";
  81   81  static const char       STR_SIGXCPU[]   = "Cpu Limit Exceeded";
  82   82  static const char       STR_SIGXFSZ[]   = "File Size Limit Exceeded";
  83   83  static const char       STR_SIGWAITING[]        = "No runnable lwp";
  84   84  static const char       STR_SIGLWP[]    = "Inter-lwp signal";
  85   85  
  86   86  const char *_sys_siglist[OLDNSIG] = {
  87   87          STR_SIG_UNK,    STR_SIGHUP,     STR_SIGINT,     STR_SIGQUIT,
  88   88          STR_SIGILL,     STR_SIGTRAP,    STR_SIGABRT,    STR_SIGEMT,
  89   89          STR_SIGFPE,     STR_SIGKILL,    STR_SIGBUS,     STR_SIGSEGV,
  90   90          STR_SIGSYS,     STR_SIGPIPE,    STR_SIGALRM,    STR_SIGTERM,
  91   91          STR_SIGUSR1,    STR_SIGUSR2,    STR_SIGCLD,     STR_SIGPWR,
  92   92          STR_SIGWINCH,   STR_SIGURG,     STR_SIGPOLL,    STR_SIGSTOP,
  93   93          STR_SIGTSTP,    STR_SIGCONT,    STR_SIGTTIN,    STR_SIGTTOU,
  94   94          STR_SIGVTALRM,  STR_SIGPROF,    STR_SIGXCPU,    STR_SIGXFSZ,
  95   95          STR_SIGWAITING, STR_SIGLWP,
  96   96  };
  97   97  
  98   98  static const char *_sys_siglist_data[NSIG] = {
  99   99          STR_SIG_UNK,    STR_SIGHUP,     STR_SIGINT,     STR_SIGQUIT,
 100  100          STR_SIGILL,     STR_SIGTRAP,    STR_SIGABRT,    STR_SIGEMT,
 101  101          STR_SIGFPE,     STR_SIGKILL,    STR_SIGBUS,     STR_SIGSEGV,
 102  102          STR_SIGSYS,     STR_SIGPIPE,    STR_SIGALRM,    STR_SIGTERM,
 103  103          STR_SIGUSR1,    STR_SIGUSR2,    STR_SIGCLD,     STR_SIGPWR,
 104  104          STR_SIGWINCH,   STR_SIGURG,     STR_SIGPOLL,    STR_SIGSTOP,
 105  105          STR_SIGTSTP,    STR_SIGCONT,    STR_SIGTTIN,    STR_SIGTTOU,
 106  106          STR_SIGVTALRM,  STR_SIGPROF,    STR_SIGXCPU,    STR_SIGXFSZ,
 107  107          STR_SIGWAITING, STR_SIGLWP,
 108  108                  "Checkpoint Freeze",                    /* SIGFREEZE    */
 109  109                  "Checkpoint Thaw",                      /* SIGTHAW      */
 110  110                  "Thread Cancellation",                  /* SIGCANCEL    */
 111  111                  "Resource Lost",                        /* SIGLOST      */
 112  112                  "Resource Control Exceeded",            /* SIGXRES      */
 113  113                  "Reserved for JVM 1",                   /* SIGJVM1      */
 114  114                  "Reserved for JVM 2",                   /* SIGJVM2      */
 115  115                  "Information Request",                  /* SIGINFO      */
 116  116                  "First Realtime Signal",                /* SIGRTMIN     */
 117  117                  "Second Realtime Signal",               /* SIGRTMIN+1   */
 118  118                  "Third Realtime Signal",                /* SIGRTMIN+2   */
 119  119                  "Fourth Realtime Signal",               /* SIGRTMIN+3   */
 120  120                  "Fifth Realtime Signal",                /* SIGRTMIN+4   */
 121  121                  "Sixth Realtime Signal",                /* SIGRTMIN+5   */
 122  122                  "Seventh Realtime Signal",              /* SIGRTMIN+6   */
 123  123                  "Eighth Realtime Signal",               /* SIGRTMIN+7   */
 124  124                  "Ninth Realtime Signal",                /* SIGRTMIN+8   */
 125  125                  "Tenth Realtime Signal",                /* SIGRTMIN+9   */
 126  126                  "Eleventh Realtime Signal",             /* SIGRTMIN+10  */
 127  127                  "Twelfth Realtime Signal",              /* SIGRTMIN+11  */
 128  128                  "Thirteenth Realtime Signal",           /* SIGRTMIN+12  */
 129  129                  "Fourteenth Realtime Signal",           /* SIGRTMIN+13  */
 130  130                  "Fifteenth Realtime Signal",            /* SIGRTMIN+14  */
 131  131                  "Sixteenth Realtime Signal",            /* SIGRTMIN+15  */
 132  132                  "Seventeenth Realtime Signal",          /* SIGRTMIN+16  */
 133  133                  "Sixteenth Last Realtime Signal",       /* SIGRTMAX-15  */
 134  134                  "Fifteenth Last Realtime Signal",       /* SIGRTMAX-14  */
 135  135                  "Fourteenth Last Realtime Signal",      /* SIGRTMAX-13  */
 136  136                  "Thirteenth Last Realtime Signal",      /* SIGRTMAX-12  */
 137  137                  "Twelfth Last Realtime Signal",         /* SIGRTMAX-11  */
 138  138                  "Eleventh Last Realtime Signal",        /* SIGRTMAX-10  */
 139  139                  "Tenth Last Realtime Signal",           /* SIGRTMAX-9   */
 140  140                  "Ninth Last Realtime Signal",           /* SIGRTMAX-8   */
 141  141                  "Eighth Last Realtime Signal",          /* SIGRTMAX-7   */
 142  142                  "Seventh Last Realtime Signal",         /* SIGRTMAX-6   */
 143  143                  "Sixth Last Realtime Signal",           /* SIGRTMAX-5   */
 144  144                  "Fifth Last Realtime Signal",           /* SIGRTMAX-4   */
 145  145                  "Fourth Last Realtime Signal",          /* SIGRTMAX-3   */
 146  146                  "Third Last Realtime Signal",           /* SIGRTMAX-2   */
 147  147                  "Second Last Realtime Signal",          /* SIGRTMAX-1   */
 148  148                  "Last Realtime Signal"                  /* SIGRTMAX     */
 149  149  };
 150  150  
 151  151  const int       _sys_siglistn = sizeof (_sys_siglist_data) / sizeof (char *);
 152  152  const char      **_sys_siglistp = _sys_siglist_data;
  
    | 
      ↓ open down ↓ | 
    152 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX