14887Schin /*********************************************************************** 24887Schin * * 34887Schin * This software is part of the ast package * 4*12068SRoger.Faulkner@Oracle.COM * Copyright (c) 1982-2010 AT&T Intellectual Property * 54887Schin * and is licensed under the * 64887Schin * Common Public License, Version 1.0 * 78462SApril.Chin@Sun.COM * by AT&T Intellectual Property * 84887Schin * * 94887Schin * A copy of the License is available at * 104887Schin * http://www.opensource.org/licenses/cpl1.0.txt * 114887Schin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 124887Schin * * 134887Schin * Information and Software Systems Research * 144887Schin * AT&T Research * 154887Schin * Florham Park NJ * 164887Schin * * 174887Schin * David Korn <dgk@research.att.com> * 184887Schin * * 194887Schin ***********************************************************************/ 204887Schin #include <ast.h> 214887Schin #include "shtable.h" 224887Schin #include "fault.h" 234887Schin 244887Schin #if defined(SIGCLD) && !defined(SIGCHLD) 254887Schin # define SIGCHLD SIGCLD 264887Schin #endif 274887Schin 288462SApril.Chin@Sun.COM #define VAL(sig,mode) ((sig+1)|((mode)<<SH_SIGBITS)) 294887Schin #define TRAP(n) (((n)|SH_TRAP)-1) 304887Schin 314887Schin #ifndef ERROR_dictionary 324887Schin # define ERROR_dictionary(s) (s) 334887Schin #endif 344887Schin #define S(s) ERROR_dictionary(s) 354887Schin 364887Schin /* 3710898Sroland.mainz@nrubsig.org * This is a table that gives numbers and default settings to each signal. 3810898Sroland.mainz@nrubsig.org * The signal numbers go in the low bits and the attributes go in the high bits. 3910898Sroland.mainz@nrubsig.org * The names must be ASCII sorted lo-hi. 404887Schin */ 414887Schin 424887Schin const struct shtable2 shtab_signals[] = 434887Schin { 444887Schin #ifdef SIGABRT 4510898Sroland.mainz@nrubsig.org "ABRT", VAL(SIGABRT,SH_SIGDONE), S("Abort"), 464887Schin #endif /*SIGABRT */ 474887Schin #ifdef SIGAIO 4810898Sroland.mainz@nrubsig.org "AIO", VAL(SIGAIO,SH_SIGIGNORE), S("Asynchronous I/O"), 494887Schin #endif /*SIGAIO */ 504887Schin #ifdef SIGALRM 5110898Sroland.mainz@nrubsig.org "ALRM", VAL(SIGALRM,SH_SIGDONE), S("Alarm call"), 5210898Sroland.mainz@nrubsig.org #endif /* SIGALRM */ 5310898Sroland.mainz@nrubsig.org #ifdef SIGALRM1 5410898Sroland.mainz@nrubsig.org "ALRM1", VAL(SIGALRM1,SH_SIGDONE), S("Scheduling - reserved"), 554887Schin #endif /* SIGALRM */ 564887Schin #ifdef SIGAPOLLO 5710898Sroland.mainz@nrubsig.org "APOLLO", VAL(SIGAPOLLO,0), S("SIGAPOLLO"), 584887Schin #endif /* SIGAPOLLO */ 594887Schin #ifdef SIGBUS 6010898Sroland.mainz@nrubsig.org "BUS", VAL(SIGBUS,SH_SIGDONE), S("Bus error"), 614887Schin #endif /* SIGBUS */ 628462SApril.Chin@Sun.COM #ifdef SIGCANCEL 6310898Sroland.mainz@nrubsig.org "CANCEL", VAL(SIGCANCEL,SH_SIGIGNORE), S("Thread cancellation"), 648462SApril.Chin@Sun.COM #endif /*SIGCANCEL */ 654887Schin #ifdef SIGCHLD 6610898Sroland.mainz@nrubsig.org "CHLD", VAL(SIGCHLD,SH_SIGFAULT), S("Death of Child"), 674887Schin # ifdef SIGCLD 684887Schin # if SIGCLD!=SIGCHLD 6910898Sroland.mainz@nrubsig.org "CLD", VAL(SIGCLD,SH_SIGFAULT), S("Death of Child"), 704887Schin # endif 714887Schin # endif /* SIGCLD */ 724887Schin #else 734887Schin # ifdef SIGCLD 7410898Sroland.mainz@nrubsig.org "CLD", VAL(SIGCLD,SH_SIGFAULT), S("Death of Child"), 754887Schin # endif /* SIGCLD */ 764887Schin #endif /* SIGCHLD */ 774887Schin #ifdef SIGCONT 7810898Sroland.mainz@nrubsig.org "CONT", VAL(SIGCONT,SH_SIGIGNORE), S("Stopped process continued"), 794887Schin #endif /* SIGCONT */ 8010898Sroland.mainz@nrubsig.org #ifdef SIGCPUFAIL 8110898Sroland.mainz@nrubsig.org "CPUFAIL", VAL(SIGCPUFAIL,0), S("Predictive processor deconfiguration"), 8210898Sroland.mainz@nrubsig.org #endif /* SIGRETRACT */ 8310898Sroland.mainz@nrubsig.org "DEBUG", VAL(TRAP(SH_DEBUGTRAP),0), "", 848462SApril.Chin@Sun.COM #ifdef SIGDANGER 8510898Sroland.mainz@nrubsig.org "DANGER", VAL(SIGDANGER,0), S("System crash soon"), 868462SApril.Chin@Sun.COM #endif /* SIGDANGER */ 874887Schin #ifdef SIGDIL 8810898Sroland.mainz@nrubsig.org "DIL", VAL(SIGDIL,0), S("DIL signal"), 894887Schin #endif /* SIGDIL */ 904887Schin #ifdef SIGEMT 9110898Sroland.mainz@nrubsig.org "EMT", VAL(SIGEMT,SH_SIGDONE), S("EMT trap"), 924887Schin #endif /* SIGEMT */ 9310898Sroland.mainz@nrubsig.org "ERR", VAL(TRAP(SH_ERRTRAP),0), "", 944887Schin #ifdef SIGERR 9510898Sroland.mainz@nrubsig.org "ERR", VAL(SIGERR,0), "", 964887Schin #endif /* SIGERR */ 9710898Sroland.mainz@nrubsig.org "EXIT", VAL(0,0), "", 9810898Sroland.mainz@nrubsig.org "FPE", VAL(SIGFPE,SH_SIGDONE), S("Floating exception"), 994887Schin #ifdef SIGFREEZE 10010898Sroland.mainz@nrubsig.org "FREEZE", VAL(SIGFREEZE,SH_SIGIGNORE), S("Special signal used by CPR"), 1014887Schin #endif /* SIGFREEZE */ 10210898Sroland.mainz@nrubsig.org #ifdef SIGGRANT 10310898Sroland.mainz@nrubsig.org "GRANT", VAL(SIGGRANT,0), S("Grant monitor mode"), 10410898Sroland.mainz@nrubsig.org #endif /* SIGGRANT */ 10510898Sroland.mainz@nrubsig.org "HUP", VAL(SIGHUP,SH_SIGDONE), S("Hangup"), 10610898Sroland.mainz@nrubsig.org "ILL", VAL(SIGILL,SH_SIGDONE), S("Illegal instruction"), 1074887Schin #ifdef JOBS 10810898Sroland.mainz@nrubsig.org "INT", VAL(SIGINT,SH_SIGINTERACTIVE), S("Interrupt"), 1094887Schin #else 11010898Sroland.mainz@nrubsig.org "INT", VAL(SIGINT,SH_SIGINTERACTIVE), "", 1114887Schin #endif /* JOBS */ 1124887Schin #ifdef SIGIO 11310898Sroland.mainz@nrubsig.org "IO", VAL(SIGIO,SH_SIGDONE), S("IO signal"), 1144887Schin #endif /* SIGIO */ 1154887Schin #ifdef SIGIOT 11610898Sroland.mainz@nrubsig.org "IOT", VAL(SIGIOT,SH_SIGDONE), S("Abort"), 1174887Schin #endif /* SIGIOT */ 1188462SApril.Chin@Sun.COM #ifdef SIGJVM1 11910898Sroland.mainz@nrubsig.org "JVM1", VAL(SIGJVM1,SH_SIGIGNORE), S("Special signal used by Java Virtual Machine"), 1208462SApril.Chin@Sun.COM #endif /*SIGJVM1 */ 1218462SApril.Chin@Sun.COM #ifdef SIGJVM2 12210898Sroland.mainz@nrubsig.org "JVM2", VAL(SIGJVM2,SH_SIGIGNORE), S("Special signal used by Java Virtual Machine"), 1238462SApril.Chin@Sun.COM #endif /*SIGJVM2 */ 12410898Sroland.mainz@nrubsig.org "KEYBD", VAL(TRAP(SH_KEYTRAP),0), "", 1254887Schin #ifdef SIGKILL 12610898Sroland.mainz@nrubsig.org "KILL", VAL(SIGKILL,0), S("Killed"), 1274887Schin #endif /* SIGKILL */ 1284887Schin #ifdef SIGLAB 12910898Sroland.mainz@nrubsig.org "LAB", VAL(SIGLAB,0), S("Security label changed"), 1304887Schin #endif /* SIGLAB */ 1314887Schin #ifdef SIGLOST 13210898Sroland.mainz@nrubsig.org "LOST", VAL(SIGLOST,SH_SIGDONE), S("Resources lost"), 1334887Schin #endif /* SIGLOST */ 1344887Schin #ifdef SIGLWP 13510898Sroland.mainz@nrubsig.org "LWP", VAL(SIGLWP,SH_SIGIGNORE), S("Special signal used by thread library"), 1364887Schin #endif /* SIGLWP */ 13710898Sroland.mainz@nrubsig.org #ifdef SIGMIGRATE 13810898Sroland.mainz@nrubsig.org "MIGRATE", VAL(SIGMIGRATE,0), S("Migrate process"), 13910898Sroland.mainz@nrubsig.org #endif /* SIGMIGRATE */ 14010898Sroland.mainz@nrubsig.org #ifdef SIGMSG 14110898Sroland.mainz@nrubsig.org "MSG", VAL(SIGMSG,0), S("Ring buffer input data"), 14210898Sroland.mainz@nrubsig.org #endif /* SIGMSG */ 1434887Schin #ifdef SIGPHONE 14410898Sroland.mainz@nrubsig.org "PHONE", VAL(SIGPHONE,0), S("Phone interrupt"), 1454887Schin #endif /* SIGPHONE */ 1464887Schin #ifdef SIGPIPE 1474887Schin #ifdef JOBS 14810898Sroland.mainz@nrubsig.org "PIPE", VAL(SIGPIPE,SH_SIGDONE), S("Broken Pipe"), 1494887Schin #else 15010898Sroland.mainz@nrubsig.org "PIPE", VAL(SIGPIPE,SH_SIGDONE), "", 1514887Schin #endif /* JOBS */ 1524887Schin #endif /* SIGPIPE */ 1534887Schin #ifdef SIGPOLL 15410898Sroland.mainz@nrubsig.org "POLL", VAL(SIGPOLL,SH_SIGDONE), S("Polling alarm"), 1554887Schin #endif /* SIGPOLL */ 1564887Schin #ifdef SIGPROF 15710898Sroland.mainz@nrubsig.org "PROF", VAL(SIGPROF,SH_SIGDONE), S("Profiling time alarm"), 1584887Schin #endif /* SIGPROF */ 15910898Sroland.mainz@nrubsig.org #ifdef SIGPRE 16010898Sroland.mainz@nrubsig.org "PRE", VAL(SIGPRE,SH_SIGDONE), S("Programming exception"), 16110898Sroland.mainz@nrubsig.org #endif /* SIGPRE */ 1624887Schin #ifdef SIGPWR 1634887Schin # if SIGPWR>0 16410898Sroland.mainz@nrubsig.org "PWR", VAL(SIGPWR,SH_SIGIGNORE), S("Power fail"), 1654887Schin # endif 1664887Schin #endif /* SIGPWR */ 1674887Schin #ifdef SIGQUIT 1684887Schin "QUIT", VAL(SIGQUIT,SH_SIGDONE|SH_SIGINTERACTIVE), S("Quit"), 1698462SApril.Chin@Sun.COM #endif /* SIGQUIT */ 17010898Sroland.mainz@nrubsig.org #ifdef SIGRETRACT 17110898Sroland.mainz@nrubsig.org "RETRACT", VAL(SIGRETRACT,0), S("Relinquish monitor mode"), 17210898Sroland.mainz@nrubsig.org #endif /* SIGRETRACT */ 1734887Schin #ifdef SIGRTMIN 17410898Sroland.mainz@nrubsig.org "RTMIN", VAL(SH_SIGRTMIN,SH_SIGRUNTIME), S("Lowest priority realtime signal"), 1754887Schin #endif /* SIGRTMIN */ 1764887Schin #ifdef SIGRTMAX 17710898Sroland.mainz@nrubsig.org "RTMAX", VAL(SH_SIGRTMAX,SH_SIGRUNTIME), S("Highest priority realtime signal"), 1784887Schin #endif /* SIGRTMAX */ 17910898Sroland.mainz@nrubsig.org #ifdef SIGSAK 18010898Sroland.mainz@nrubsig.org "SAK", VAL(SIGSAK,0), S("Secure attention key"), 18110898Sroland.mainz@nrubsig.org #endif /* SIGSAK */ 18210898Sroland.mainz@nrubsig.org "SEGV", VAL(SIGSEGV,0), S("Memory fault"), 18310898Sroland.mainz@nrubsig.org #ifdef SIGSOUND 18410898Sroland.mainz@nrubsig.org "SOUND", VAL(SIGSOUND,0), S("Sound completed"), 18510898Sroland.mainz@nrubsig.org #endif /* SIGSOUND */ 1864887Schin #ifdef SIGSTOP 18710898Sroland.mainz@nrubsig.org "STOP", VAL(SIGSTOP,0), S("Stopped (SIGSTOP)"), 1884887Schin #endif /* SIGSTOP */ 1894887Schin #ifdef SIGSYS 19010898Sroland.mainz@nrubsig.org "SYS", VAL(SIGSYS,SH_SIGDONE), S("Bad system call"), 1914887Schin #endif /* SIGSYS */ 1924887Schin "TERM", VAL(SIGTERM,SH_SIGDONE|SH_SIGINTERACTIVE), S("Terminated"), 19310898Sroland.mainz@nrubsig.org #ifdef SIGTHAW 19410898Sroland.mainz@nrubsig.org "THAW", VAL(SIGTHAW,SH_SIGIGNORE), S("Special signal used by CPR"), 19510898Sroland.mainz@nrubsig.org #endif /* SIGTHAW */ 1964887Schin #ifdef SIGTINT 1974887Schin # ifdef JOBS 19810898Sroland.mainz@nrubsig.org "TINT", VAL(SIGTINT,0), S("Interrupt"), 1994887Schin # else 20010898Sroland.mainz@nrubsig.org "TINT", VAL(SIGTINT,0), "", 2014887Schin # endif /* JOBS */ 2024887Schin #endif /* SIGTINT */ 2034887Schin #ifdef SIGTRAP 20410898Sroland.mainz@nrubsig.org "TRAP", VAL(SIGTRAP,SH_SIGDONE), S("Trace/BPT trap"), 2054887Schin #endif /* SIGTRAP */ 2064887Schin #ifdef SIGTSTP 20710898Sroland.mainz@nrubsig.org "TSTP", VAL(SIGTSTP,0), S("Stopped"), 2084887Schin #endif /* SIGTSTP */ 2094887Schin #ifdef SIGTTIN 21010898Sroland.mainz@nrubsig.org "TTIN", VAL(SIGTTIN,0), S("Stopped (SIGTTIN)"), 2114887Schin #endif /* SIGTTIN */ 2124887Schin #ifdef SIGTTOU 21310898Sroland.mainz@nrubsig.org "TTOU", VAL(SIGTTOU,0), S("Stopped(SIGTTOU)"), 2144887Schin #endif /* SIGTTOU */ 2154887Schin #ifdef SIGURG 21610898Sroland.mainz@nrubsig.org "URG", VAL(SIGURG,SH_SIGIGNORE), S("Socket interrupt"), 2174887Schin #endif /* SIGURG */ 2184887Schin #ifdef SIGUSR1 21910898Sroland.mainz@nrubsig.org "USR1", VAL(SIGUSR1,SH_SIGDONE), S("User signal 1"), 2204887Schin #endif /* SIGUSR1 */ 2214887Schin #ifdef SIGUSR2 22210898Sroland.mainz@nrubsig.org "USR2", VAL(SIGUSR2,SH_SIGDONE), S("User signal 2"), 2234887Schin #endif /* SIGUSR2 */ 22410898Sroland.mainz@nrubsig.org #ifdef SIGVIRT 22510898Sroland.mainz@nrubsig.org "VIRT", VAL(SIGVIRT,0), S("Virtual timer alarm"), 22610898Sroland.mainz@nrubsig.org #endif /* SIGVIRT */ 2274887Schin #ifdef SIGVTALRM 22810898Sroland.mainz@nrubsig.org "VTALRM", VAL(SIGVTALRM,SH_SIGDONE), S("Virtual time alarm"), 2294887Schin #endif /* SIGVTALRM */ 23010898Sroland.mainz@nrubsig.org #ifdef SIGWAITING 23110898Sroland.mainz@nrubsig.org "WAITING", VAL(SIGWAITING,SH_SIGIGNORE), S("All threads blocked"), 23210898Sroland.mainz@nrubsig.org #endif /* SIGWAITING */ 2334887Schin #ifdef SIGWINCH 23410898Sroland.mainz@nrubsig.org "WINCH", VAL(SIGWINCH,SH_SIGIGNORE), S("Window size change"), 2354887Schin #endif /* SIGWINCH */ 2364887Schin #ifdef SIGXCPU 2374887Schin "XCPU", VAL(SIGXCPU,SH_SIGDONE|SH_SIGINTERACTIVE), S("Exceeded CPU time limit"), 2384887Schin #endif /* SIGXCPU */ 2394887Schin #ifdef SIGXFSZ 2404887Schin "XFSZ", VAL(SIGXFSZ,SH_SIGDONE|SH_SIGINTERACTIVE), S("Exceeded file size limit"), 2414887Schin #endif /* SIGXFSZ */ 2428462SApril.Chin@Sun.COM #ifdef SIGXRES 2438462SApril.Chin@Sun.COM "XRES", VAL(SIGXRES,SH_SIGDONE|SH_SIGINTERACTIVE), S("Exceeded resource control"), 2448462SApril.Chin@Sun.COM #endif /* SIGRES */ 2454887Schin "", 0, 0 2464887Schin }; 247