2 * $Header: /src/pub/tcsh/sh.init.c,v 3.49 2002/03/08 17:36:46 christos Exp $
3 * $DragonFly: src/contrib/tcsh/Attic/sh.init.c,v 1.4 2003/10/24 17:14:14 dillon Exp $
6 * sh.init.c: Function and signal tables
9 * Copyright (c) 1980, 1991 The Regents of the University of California.
10 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. Neither the name of the University nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 RCSID("$Id: sh.init.c,v 3.49 2002/03/08 17:36:46 christos Exp $")
47 #define INF 0x7fffffff
49 struct biltins bfunc[] = {
50 { ":", dozip, 0, INF },
51 { "@", dolet, 0, INF },
52 { "alias", doalias, 0, INF },
54 { "aliases", doaliases, 0, 1, },
56 { "alloc", showall, 0, 1 },
58 { "att", doatt, 0, INF },
60 { "bg", dobg, 0, INF },
62 { "bind", dobind, 0, 2 },
64 { "bindkey", dobindkey, 0, 8 },
65 { "break", dobreak, 0, 0 },
66 { "breaksw", doswbrk, 0, 0 },
67 { "builtins", dobuiltins, 0, 0 },
69 { "bye", goodbye, 0, 0 },
71 { "case", dozip, 0, 1 },
72 { "cd", dochngd, 0, INF },
73 { "chdir", dochngd, 0, INF },
74 { "complete", docomplete, 0, INF },
75 { "continue", docontin, 0, 0 },
76 { "default", dozip, 0, 0 },
77 { "dirs", dodirs, 0, INF },
78 #if defined(_CRAY) && !defined(_CRAYMPP)
79 { "dmmode", dodmmode, 0, 1 },
80 #endif /* _CRAY && !_CRAYMPP */
81 { "echo", doecho, 0, INF },
82 { "echotc", doechotc, 0, INF },
83 { "else", doelse, 0, INF },
84 { "end", doend, 0, 0 },
85 { "endif", dozip, 0, 0 },
86 { "endsw", dozip, 0, 0 },
87 { "eval", doeval, 0, INF },
88 { "exec", execash, 1, INF },
89 { "exit", doexit, 0, INF },
90 { "fg", dofg, 0, INF },
91 { "filetest", dofiletest, 2, INF },
92 { "foreach", doforeach, 3, INF },
94 { "getspath", dogetspath, 0, 0 },
95 { "getxvers", dogetxvers, 0, 0 },
97 { "glob", doglob, 0, INF },
98 { "goto", dogoto, 1, 1 },
99 { "hashstat", hashstat, 0, 0 },
100 { "history", dohist, 0, 2 },
101 { "hup", dohup, 0, INF },
102 { "if", doif, 1, INF },
104 { "inlib", doinlib, 1, INF },
106 { "jobs", dojobs, 0, 1 },
107 { "kill", dokill, 1, INF },
109 { "limit", dolimit, 0, 3 },
110 #endif /* !HAVENOLIMIT */
112 { "linedit", doecho, 0, INF },
113 #endif /* OBSOLETE */
114 #if !defined(HAVENOUTMP) && !defined(KAI)
115 { "log", dolog, 0, 0 },
116 #endif /* !HAVENOUTMP && !KAI */
117 { "login", dologin, 0, 1 },
118 { "logout", dologout, 0, 0 },
119 { "ls-F", dolist, 0, INF },
121 { "migrate", domigrate, 1, INF },
124 { "newgrp", donewgrp, 1, 2 },
126 { "nice", donice, 0, INF },
127 { "nohup", donohup, 0, INF },
128 { "notify", donotify, 0, INF },
129 { "onintr", doonintr, 0, 2 },
130 { "popd", dopopd, 0, INF },
131 { "printenv", doprintenv, 0, 1 },
132 { "pushd", dopushd, 0, INF },
133 { "rehash", dohash, 0, 3 },
134 { "repeat", dorepeat, 2, INF },
136 { "rootnode", dorootnode, 1, 1 },
138 { "sched", dosched, 0, INF },
139 { "set", doset, 0, INF },
140 { "setenv", dosetenv, 0, 2 },
142 { "setpath", dosetpath, 0, INF },
145 { "setspath", dosetspath, 1, INF },
147 { "settc", dosettc, 2, 2 },
148 { "setty", dosetty, 0, INF },
150 { "setxvers", dosetxvers, 0, 1 },
152 { "shift", shift, 0, 1 },
153 { "source", dosource, 1, INF },
154 { "stop", dostop, 1, INF },
155 { "suspend", dosuspend, 0, 0 },
156 { "switch", doswitch, 1, INF },
157 { "telltc", dotelltc, 0, INF },
158 { "time", dotime, 0, INF },
160 { "ucb", doucb, 0, INF },
162 { "umask", doumask, 0, 1 },
163 { "unalias", unalias, 1, INF },
164 { "uncomplete", douncomplete, 1, INF },
165 { "unhash", dounhash, 0, 0 },
166 #if defined(masscomp) || defined(_CX_UX)
167 { "universe", douniverse, 0, INF },
168 #endif /* masscomp || _CX_UX */
170 { "unlimit", dounlimit, 0, INF },
171 #endif /* !HAVENOLIMIT */
172 { "unset", unset, 1, INF },
173 { "unsetenv", dounsetenv, 1, INF },
175 { "ver", dover, 0, INF },
177 { "wait", dowait, 0, 0 },
179 { "warp", dowarp, 0, 2 },
181 #if !defined(HAVENOUTMP) && defined(KAI)
182 { "watchlog", dolog, 0, 0 },
183 #endif /* !HAVENOUTMP && KAI */
184 { "where", dowhere, 1, INF },
185 { "which", dowhich, 1, INF },
186 { "while", dowhile, 1, INF }
188 int nbfunc = sizeof bfunc / sizeof *bfunc;
190 struct srch srchn[] = {
192 { "break", TC_BREAK },
193 { "breaksw", TC_BRKSW },
195 { "default", TC_DEFAULT },
198 { "endif", TC_ENDIF },
199 { "endsw", TC_ENDSW },
201 { "foreach", TC_FOREACH },
204 { "label", TC_LABEL },
206 { "switch", TC_SWITCH },
207 { "while", TC_WHILE }
209 int nsrchn = sizeof srchn / sizeof *srchn;
213 * Note: For some machines, (hpux eg.)
214 * NSIG = number of signals + 1...
215 * so we define 33 or 65 (POSIX) signals for
219 /* We define NUMSIG to avoid changing NSIG or MAXSIG */
226 int nsig = NUMSIG - 1; /* This should be the number of real signals */
227 /* not counting signal 0 */
228 struct mesg mesg[NUMSIG]; /* Arrays start at [0] so we initialize from */
229 /* 0 to 32 or 64, the max real signal number */
238 for (i = 0; i < NUMSIG; i++) {
239 xfree((ptr_t) mesg[i].pname);
240 mesg[i].pname = NULL;
242 #endif /* NLS_CATALOGS */
244 #if defined(SIGNULL) || defined(DECOSF1)
247 # endif /* !SIGNULL */
248 if (mesg[SIGNULL].pname == NULL) {
249 mesg[SIGNULL].iname = "NULL";
250 mesg[SIGNULL].pname = CSAVS(2, 1, "Null signal");
252 #endif /* SIGNULL || DECOSF1 */
255 if (mesg[SIGHUP].pname == NULL) {
256 mesg[SIGHUP].iname = "HUP";
257 mesg[SIGHUP].pname = CSAVS(2, 2, "Hangup");
262 if (mesg[SIGINT].pname == NULL) {
263 mesg[SIGINT].iname = "INT";
264 mesg[SIGINT].pname = CSAVS(2, 3, "Interrupt");
269 if (mesg[SIGQUIT].pname == NULL) {
270 mesg[SIGQUIT].iname = "QUIT";
271 mesg[SIGQUIT].pname = CSAVS(2, 4, "Quit");
276 if (mesg[SIGILL].pname == NULL) {
277 mesg[SIGILL].iname = "ILL";
278 mesg[SIGILL].pname = CSAVS(2, 5, "Illegal instruction");
283 if (mesg[SIGTRAP].pname == NULL) {
284 mesg[SIGTRAP].iname = "TRAP";
285 mesg[SIGTRAP].pname = CSAVS(2, 6, "Trace/BPT trap");
290 if (mesg[SIGABRT].pname == NULL) {
291 mesg[SIGABRT].iname = "ABRT";
292 mesg[SIGABRT].pname = CSAVS(2, 7, "Abort");
297 if (mesg[SIGIOT].pname == NULL) {
298 mesg[SIGIOT].iname = "IOT";
299 mesg[SIGIOT].pname = CSAVS(2, 8, "IOT trap");
305 if (mesg[SIGDANGER].pname == NULL) {
306 mesg[SIGDANGER].iname = "DANGER";
307 mesg[SIGDANGER].pname = CSAVS(2, 9, "System Crash Imminent");
309 #endif /* SIGDANGER */
313 if (mesg[SIGERR].pname == NULL) {
314 mesg[SIGERR].iname = "ERR";
315 mesg[SIGERR].pname = CSAVS(2, 10, "Error exit");
320 if (mesg[SIGEMT].pname == NULL) {
321 mesg[SIGEMT].iname = "EMT";
322 mesg[SIGEMT].pname = CSAVS(2, 11, "EMT trap");
327 if (mesg[SIGFPE].pname == NULL) {
328 mesg[SIGFPE].iname = "FPE";
329 mesg[SIGFPE].pname = CSAVS(2, 12, "Floating exception");
334 if (mesg[SIGKILL].pname == NULL) {
335 mesg[SIGKILL].iname = "KILL";
336 mesg[SIGKILL].pname = CSAVS(2, 13, "Killed");
341 if (mesg[SIGUSR1].pname == NULL) {
342 mesg[SIGUSR1].iname = "USR1";
343 mesg[SIGUSR1].pname = CSAVS(2, 14, "User signal 1");
348 if (mesg[SIGUSR2].pname == NULL) {
349 mesg[SIGUSR2].iname = "USR2";
350 mesg[SIGUSR2].pname = CSAVS(2, 15, "User signal 2");
355 if (mesg[SIGSEGV].pname == NULL) {
356 mesg[SIGSEGV].iname = "SEGV";
357 mesg[SIGSEGV].pname = CSAVS(2, 16, "Segmentation fault");
362 if (mesg[SIGBUS].pname == NULL) {
363 mesg[SIGBUS].iname = "BUS";
364 mesg[SIGBUS].pname = CSAVS(2, 17, "Bus error");
369 /* _CRAY || IBMAIX */
370 if (mesg[SIGPRE].pname == NULL) {
371 mesg[SIGPRE].iname = "PRE";
372 mesg[SIGPRE].pname = CSAVS(2, 18, "Program range error");
378 if (mesg[SIGORE].pname == NULL) {
379 mesg[SIGORE].iname = "ORE";
380 mesg[SIGORE].pname = CSAVS(2, 19, "Operand range error");
385 if (mesg[SIGSYS].pname == NULL) {
386 mesg[SIGSYS].iname = "SYS";
387 mesg[SIGSYS].pname = CSAVS(2, 20, "Bad system call");
392 if (mesg[SIGPIPE].pname == NULL) {
393 mesg[SIGPIPE].iname = "PIPE";
394 mesg[SIGPIPE].pname = CSAVS(2, 21, "Broken pipe");
399 if (mesg[SIGALRM].pname == NULL) {
400 mesg[SIGALRM].iname = "ALRM";
401 mesg[SIGALRM].pname = CSAVS(2, 22, "Alarm clock");
406 if (mesg[SIGTERM].pname == NULL) {
407 mesg[SIGTERM].iname = "TERM";
408 mesg[SIGTERM].pname = CSAVS(2, 23, "Terminated");
412 /* SIGCLD vs SIGCHLD */
413 #if !defined(SIGCHLD) || defined(SOLARIS2) || defined(apollo) || defined(__EMX__)
414 /* If we don't define SIGCHLD, or our OS prefers SIGCLD to SIGCHLD, */
415 /* check for SIGCLD */
417 if (mesg[SIGCLD].pname == NULL) {
418 mesg[SIGCLD].iname = "CLD";
420 mesg[SIGCLD].pname = CSAVS(2, 24, "Child status change");
421 # else /* !BSDJOBS */
422 mesg[SIGCLD].pname = CSAVS(2, 25, "Death of child");
423 # endif /* BSDJOBS */
426 #else /* !(!SIGCHLD || SOLARIS2 || apollo || __EMX__) */
427 /* We probably define SIGCHLD */
429 if (mesg[SIGCHLD].pname == NULL) {
430 mesg[SIGCHLD].iname = "CHLD";
432 mesg[SIGCHLD].pname = CSAVS(2, 27, "Child stopped or exited");
433 # else /* !BSDJOBS */
434 mesg[SIGCHLD].pname = CSAVS(2, 28, "Child exited");
435 # endif /* BSDJOBS */
437 # endif /* SIGCHLD */
438 #endif /* !SIGCHLD || SOLARIS2 || apollo || __EMX__ */
442 if (mesg[SIGAPOLLO].pname == NULL) {
443 mesg[SIGAPOLLO].iname = "APOLLO";
444 mesg[SIGAPOLLO].pname = CSAVS(2, 26, "Apollo-specific fault");
446 #endif /* SIGAPOLLO */
449 if (mesg[SIGPWR].pname == NULL) {
450 mesg[SIGPWR].iname = "PWR";
451 mesg[SIGPWR].pname = CSAVS(2, 29, "Power failure");
456 if (mesg[SIGLOST].pname == NULL) {
457 mesg[SIGLOST].iname = "LOST";
458 mesg[SIGLOST].pname = CSAVS(2, 30, "Resource Lost");
464 if (mesg[SIGBREAK].pname == NULL) {
465 mesg[SIGBREAK].iname = "BREAK";
466 mesg[SIGBREAK].pname = CSAVS(2, 31, "Break (Ctrl-Break)");
468 #endif /* SIGBREAK */
471 # if !defined(SIGPOLL) || SIGPOLL != SIGIO
472 if (mesg[SIGIO].pname == NULL) {
473 mesg[SIGIO].iname = "IO";
475 mesg[SIGIO].pname = CSAVS(2, 32, "Input/output possible signal");
477 mesg[SIGIO].pname = CSAVS(2, 33, "Asynchronous I/O (select)");
480 # endif /* !SIGPOLL || SIGPOLL != SIGIO */
484 if (mesg[SIGCKPT].pname == NULL) {
485 mesg[SIGCKPT].iname = "CKPT";
486 mesg[SIGCKPT].pname = CSAVS(2, 34, "Checkpoint and continue");
491 if (mesg[SIGCKPTEXIT].pname == NULL) {
492 mesg[SIGCKPTEXIT].iname = "CKPTEXIT";
493 mesg[SIGCKPTEXIT].pname = CSAVS(2, 35, "Checkpoint and eXit");
495 #endif /* SIGCKPTEXIT */
498 if (mesg[SIGURG].pname == NULL) {
499 mesg[SIGURG].iname = "URG";
500 mesg[SIGURG].pname = CSAVS(2, 34, "Urgent condition on I/O channel");
506 if (mesg[SIGMT].pname == NULL) {
507 mesg[SIGMT].iname = "MT";
508 mesg[SIGMT].pname = CSAVS(2, 35, "Multitasking wake-up");
514 if (mesg[SIGMTKILL].pname == NULL) {
515 mesg[SIGMTKILL].iname = "MTKILL";
516 mesg[SIGMTKILL].pname = CSAVS(2, 36, "Multitasking kill");
518 #endif /* SIGMTKILL */
522 if (mesg[SIGBUFIO].pname == NULL) {
523 mesg[SIGBUFIO].iname = "BUFIO";
524 mesg[SIGBUFIO].pname = CSAVS(2, 37,
525 "Fortran asynchronous I/O completion");
527 #endif /* SIGBUFIO */
531 if (mesg[SIGRECOVERY].pname == NULL) {
532 mesg[SIGRECOVERY].iname = "RECOVERY";
533 mesg[SIGRECOVERY].pname = CSAVS(2, 38, "Recovery");
535 #endif /* SIGRECOVERY */
539 if (mesg[SIGUME].pname == NULL) {
540 mesg[SIGUME].iname = "UME";
541 mesg[SIGUME].pname = CSAVS(2, 39, "Uncorrectable memory error");
547 if (mesg[SIGCPULIM].pname == NULL) {
548 mesg[SIGCPULIM].iname = "CPULIM";
549 mesg[SIGCPULIM].pname = CSAVS(2, 40, "CPU time limit exceeded");
551 #endif /* SIGCPULIM */
555 if (mesg[SIGSHUTDN].pname == NULL) {
556 mesg[SIGSHUTDN].iname = "SHUTDN";
557 mesg[SIGSHUTDN].pname = CSAVS(2, 41, "System shutdown imminent");
559 #endif /* SIGSHUTDN */
563 if (mesg[SIGNOWAK].pname == NULL) {
564 mesg[SIGNOWAK].iname = "NOWAK";
565 mesg[SIGNOWAK].pname = CSAVS(2, 42,
566 "Micro-tasking group-no wakeup flag set");
568 #endif /* SIGNOWAK */
572 if (mesg[SIGTHERR].pname == NULL) {
573 mesg[SIGTHERR].iname = "THERR";
574 mesg[SIGTHERR].pname = CSAVS(2, 43,
575 "Thread error - (use cord -T for detailed info)");
577 #endif /* SIGTHERR */
581 if (mesg[SIGRPE].pname == NULL) {
582 mesg[SIGRPE].pname = CSAVS(2, 44, "CRAY Y-MP register parity error");
583 mesg[SIGRPE].iname = "RPE";
588 if (mesg[SIGINFO].pname == NULL) {
589 mesg[SIGINFO].iname = "INFO";
590 mesg[SIGINFO].pname = CSAVS(2, 45, "Information request");
595 if (mesg[SIGSTOP].pname == NULL) {
596 mesg[SIGSTOP].iname = "STOP";
598 mesg[SIGSTOP].pname = CSAVS(2, 46, "Suspended (signal)");
599 # else /* !SUSPENDED */
600 mesg[SIGSTOP].pname = CSAVS(2, 47, "Stopped (signal)");
601 # endif /* SUSPENDED */
606 if (mesg[SIGTSTP].pname == NULL) {
607 mesg[SIGTSTP].iname = "TSTP";
609 mesg[SIGTSTP].pname = CSAVS(2, 48, "Suspended");
610 # else /* !SUSPENDED */
611 mesg[SIGTSTP].pname = CSAVS(2, 49, "Stopped");
612 # endif /* SUSPENDED */
617 if (mesg[SIGCONT].pname == NULL) {
618 mesg[SIGCONT].iname = "CONT";
619 mesg[SIGCONT].pname = CSAVS(2, 50, "Continued");
624 if (mesg[SIGTTIN].pname == NULL) {
625 mesg[SIGTTIN].iname = "TTIN";
627 mesg[SIGTTIN].pname = CSAVS(2, 51, "Suspended (tty input)");
628 # else /* !SUSPENDED */
629 mesg[SIGTTIN].pname = CSAVS(2, 52, "Stopped (tty input)");
630 # endif /* SUSPENDED */
635 if (mesg[SIGTTOU].pname == NULL) {
636 mesg[SIGTTOU].iname = "TTOU";
638 mesg[SIGTTOU].pname = CSAVS(2, 53, "Suspended (tty output)");
639 # else /* SUSPENDED */
640 mesg[SIGTTOU].pname = CSAVS(2, 54, "Stopped (tty output)");
641 # endif /* SUSPENDED */
647 if (mesg[SIGWIND].pname == NULL) {
648 mesg[SIGWIND].iname = "WIND";
649 mesg[SIGWIND].pname = CSAVS(2, 55, "Window status changed");
654 if (mesg[SIGWINDOW].pname == NULL) {
655 mesg[SIGWINDOW].iname = "WINDOW";
656 mesg[SIGWINDOW].pname = CSAVS(2, 56, "Window size changed");
658 #endif /* SIGWINDOW */
661 if (mesg[SIGWINCH].pname == NULL) {
662 mesg[SIGWINCH].iname = "WINCH";
663 mesg[SIGWINCH].pname = CSAVS(2, 56, "Window size changed");
665 #endif /* SIGWINCH */
669 if (mesg[SIGPHONE].pname == NULL) {
670 mesg[SIGPHONE].iname = "PHONE";
671 mesg[SIGPHONE].pname = CSAVS(2, 57, "Phone status changed");
673 # endif /* SIGPHONE */
676 if (mesg[SIGXCPU].pname == NULL) {
677 mesg[SIGXCPU].iname = "XCPU";
678 mesg[SIGXCPU].pname = CSAVS(2, 58, "Cputime limit exceeded");
683 if (mesg[SIGXFSZ].pname == NULL) {
684 mesg[SIGXFSZ].iname = "XFSZ";
685 mesg[SIGXFSZ].pname = CSAVS(2, 59, "Filesize limit exceeded");
690 if (mesg[SIGVTALRM].pname == NULL) {
691 mesg[SIGVTALRM].iname = "VTALRM";
692 mesg[SIGVTALRM].pname = CSAVS(2, 60, "Virtual time alarm");
694 #endif /* SIGVTALRM */
697 if (mesg[SIGPROF].pname == NULL) {
698 mesg[SIGPROF].iname = "PROF";
699 mesg[SIGPROF].pname = CSAVS(2, 61, "Profiling time alarm");
705 if (mesg[SIGDIL].pname == NULL) {
706 mesg[SIGDIL].iname = "DIL";
707 mesg[SIGDIL].pname = CSAVS(2, 62, "DIL signal");
712 if (mesg[SIGPOLL].pname == NULL) {
713 mesg[SIGPOLL].iname = "POLL";
714 mesg[SIGPOLL].pname = CSAVS(2, 63, "Pollable event occured");
720 if (mesg[SIGWAITING].pname == NULL) {
721 mesg[SIGWAITING].iname = "WAITING";
722 mesg[SIGWAITING].pname = CSAVS(2, 64, "Process's lwps are blocked");
724 #endif /* SIGWAITING */
728 if (mesg[SIGLWP].pname == NULL) {
729 mesg[SIGLWP].iname = "LWP";
730 mesg[SIGLWP].pname = CSAVS(2, 65, "Special LWP signal");
736 if (mesg[SIGFREEZE].pname == NULL) {
737 mesg[SIGFREEZE].iname = "FREEZE";
738 mesg[SIGFREEZE].pname = CSAVS(2, 66, "Special CPR Signal");
740 #endif /* SIGFREEZE */
744 if (mesg[SIGTHAW].pname == NULL) {
745 mesg[SIGTHAW].iname = "THAW";
746 mesg[SIGTHAW].pname = CSAVS(2, 67, "Special CPR Signal");
752 if (mesg[SIGCANCEL].pname == NULL) {
753 mesg[SIGCANCEL].iname = "CANCEL";
754 mesg[SIGCANCEL].pname = CSAVS(2, 109,
755 "Thread cancellation signal used by libthread");
757 #endif /* SIGCANCEL */
760 * Careful, some OS's (HP/UX 10.0) define these as -1
764 * Cannot do this at compile time; Solaris2 uses _sysconf for these
766 if (SIGRTMIN > 0 && SIGRTMIN < NUMSIG) {
767 if (mesg[SIGRTMIN].pname == NULL) {
768 mesg[SIGRTMIN].iname = "RTMIN";
769 mesg[SIGRTMIN].pname = CSAVS(2, 68, "First Realtime Signal");
772 if (mesg[SIGRTMIN+1].pname == NULL) {
773 mesg[SIGRTMIN+1].iname = "RTMIN+1";
774 mesg[SIGRTMIN+1].pname = CSAVS(2, 69, "Second Realtime Signal");
777 if (mesg[SIGRTMIN+2].pname == NULL) {
778 mesg[SIGRTMIN+2].iname = "RTMIN+2";
779 mesg[SIGRTMIN+2].pname = CSAVS(2, 70, "Third Realtime Signal");
782 if (mesg[SIGRTMIN+3].pname == NULL) {
783 mesg[SIGRTMIN+3].iname = "RTMIN+3";
784 mesg[SIGRTMIN+3].pname = CSAVS(2, 71, "Fourth Realtime Signal");
787 #endif /* SIGRTMIN */
791 * Cannot do this at compile time; Solaris2 uses _sysconf for these
793 if (SIGRTMAX > 0 && SIGRTMAX < NUMSIG) {
794 if (mesg[SIGRTMAX-3].pname == NULL) {
795 mesg[SIGRTMAX-3].iname = "RTMAX-3";
796 mesg[SIGRTMAX-3].pname = CSAVS(2, 72,
797 "Fourth Last Realtime Signal");
800 if (mesg[SIGRTMAX-2].pname == NULL) {
801 mesg[SIGRTMAX-2].iname = "RTMAX-2";
802 mesg[SIGRTMAX-2].pname = CSAVS(2, 73,
803 "Third Last Realtime Signal");
806 if (mesg[SIGRTMAX-1].pname == NULL) {
807 mesg[SIGRTMAX-1].iname = "RTMAX-1";
808 mesg[SIGRTMAX-1].pname = CSAVS(2, 74,
809 "Second Last Realtime Signal");
812 if (mesg[SIGRTMAX].pname == NULL) {
813 mesg[SIGRTMAX].iname = "RTMAX";
814 mesg[SIGRTMAX].pname = CSAVS(2, 75,
815 "Last Realtime Signal");
818 #endif /* SIGRTMAX */
823 if (mesg[SIGAIO].pname == NULL) {
824 mesg[SIGAIO].iname = "AIO";
825 mesg[SIGAIO].pname = CSAVS(2, 76, "LAN Asyncronous I/O");
831 if (mesg[SIGPTY].pname == NULL) {
832 mesg[SIGPTY].iname = "PTY";
833 mesg[SIGPTY].pname = CSAVS(2, 77, "PTY read/write availability");
839 if (mesg[SIGIOINT].pname == NULL) {
840 mesg[SIGIOINT].iname = "IOINT";
841 mesg[SIGIOINT].pname = CSAVS(2, 78, "I/O intervention required");
843 #endif /* SIGIOINT */
847 if (mesg[SIGGRANT].pname == NULL) {
848 mesg[SIGGRANT].iname = "GRANT";
849 mesg[SIGGRANT].pname = CSAVS(2, 79, "HFT monitor mode granted");
851 #endif /* SIGGRANT */
855 if (mesg[SIGRETRACT].pname == NULL) {
856 mesg[SIGRETRACT].iname = "RETRACT";
857 mesg[SIGRETRACT].pname = CSAVS(2, 80,
858 "HFT monitor mode should be relinguished");
860 #endif /* SIGRETRACT */
864 if (mesg[SIGSOUND].pname == NULL) {
865 mesg[SIGSOUND].iname = "SOUND";
866 mesg[SIGSOUND].pname = CSAVS(2, 81, "HFT sound control has completed");
868 #endif /* SIGSOUND */
872 if (mesg[SIGSMSG].pname == NULL) {
873 mesg[SIGSMSG].iname = "SMSG";
874 mesg[SIGSMSG].pname = CSAVS(2, 82, "Data in HFT ring buffer");
880 if (mesg[SIGMIGRATE].pname == NULL) {
881 mesg[SIGMIGRATE].iname = "MIGRATE";
882 mesg[SIGMIGRATE].pname = CSAVS(2, 83, "Migrate process");
884 #endif /* SIGMIGRATE */
888 if (mesg[SIGSAK].pname == NULL) {
889 mesg[SIGSAK].iname = "SAK";
890 mesg[SIGSAK].pname = CSAVS(2, 84, "Secure attention key");
896 if (mesg[SIGRESCHED].pname == NULL) {
897 mesg[SIGRESCHED].iname = "RESCHED";
898 mesg[SIGRESCHED].pname = CSAVS(2, 85, "Reschedule");
900 #endif /* SIGRESCHED */
904 if (mesg[SIGDEBUG].pname == NULL) {
905 mesg[SIGDEBUG].iname = "DEBUG";
906 mesg[SIGDEBUG].pname = CSAVS(2, 86, "Signaling SS$_DEBUG");
908 #endif /* SIGDEBUG */
912 if (mesg[SIGPRIO].pname == NULL) {
913 mesg[SIGPRIO].iname = "PRIO";
914 mesg[SIGPRIO].pname = CSAVS(2, 87, "Priority changed");
920 if (mesg[SIGDLK].pname == NULL) {
921 mesg[SIGDLK].iname = "DLK";
922 mesg[SIGDLK].pname = CSAVS(2, 88, "True deadlock detected");
928 if (mesg[SIGTINT].pname == NULL) {
929 mesg[SIGTINT].iname = "TINT";
930 mesg[SIGTINT].pname = CSAVS(2, 89, "New input character");
935 if (mesg[SIGSTKFLT].pname == NULL) {
936 mesg[SIGSTKFLT].iname = "STKFLT";
937 mesg[SIGSTKFLT].pname = CSAVS(2, 90, "Stack limit exceeded");
939 #endif /* SIGSTKFLT */
942 if (mesg[SIGUNUSED].pname == NULL) {
943 mesg[SIGUNUSED].iname = "UNUSED";
944 mesg[SIGUNUSED].pname = CSAVS(2, 91, "Unused signal");
946 #endif /* SIGUNUSED */
950 if (mesg[SIGOVLY].pname == NULL) {
951 mesg[SIGOVLY].iname = "OVLY";
952 mesg[SIGOVLY].pname = CSAVS(2, 92, "LM overlay");
958 if (mesg[SIGFRZ].pname == NULL) {
959 mesg[SIGFRZ].iname = "FRZ";
960 mesg[SIGFRZ].pname = CSAVS(2, 93, "system freeze");
966 if (mesg[SIGDFRZ].pname == NULL) {
967 mesg[SIGDFRZ].iname = "DFRZ";
968 mesg[SIGDFRZ].pname = CSAVS(2, 94, "system defreeze");
974 if (mesg[SIGDEAD].pname == NULL) {
975 mesg[SIGDEAD].iname = "DEAD";
976 mesg[SIGDEAD].pname = CSAVS(2, 95, "dead lock");
982 if (mesg[SIGXMEM].pname == NULL) {
983 mesg[SIGXMEM].iname = "XMEM";
984 mesg[SIGXMEM].pname = CSAVS(2, 96, "exceeded memory size limit");
990 if (mesg[SIGXDSZ].pname == NULL) {
991 mesg[SIGXDSZ].iname = "XDSZ";
992 mesg[SIGXDSZ].pname = CSAVS(2, 97, "exceeded data size limit");
998 if (mesg[SIGMEM32].pname == NULL) {
999 mesg[SIGMEM32].iname = "MEM32";
1000 mesg[SIGMEM32].pname = CSAVS(2, 98, "exceeded memory size limit of 32KB");
1002 #endif /* SIGMEM32 */
1006 if (mesg[SIGNMEM].pname == NULL) {
1007 mesg[SIGNMEM].iname = "NMEM";
1008 mesg[SIGNMEM].pname = CSAVS(2, 99, "exce error for no memory");
1010 #endif /* SIGNMEM */
1014 if (mesg[SIGCHKP].pname == NULL) {
1015 mesg[SIGCHKP].iname = "CHKP";
1016 mesg[SIGCHKP].pname = CSAVS(2, 100, "check point start");
1018 #endif /* SIGCHKP */
1023 if (mesg[SIGKCHKP].pname == NULL) {
1024 mesg[SIGKCHKP].iname = "KCHKP";
1025 mesg[SIGKCHKP].pname = CSAVS(2, 101, "check point start of kernel");
1028 #endif /* SIGKCHKP */
1032 if (mesg[SIGRSTA].pname == NULL) {
1033 mesg[SIGRSTA].iname = "RSTA";
1034 mesg[SIGRSTA].pname = CSAVS(2, 102, "restart start");
1036 #endif /* SIGRSTA */
1041 if (mesg[SIGKRSTA].pname == NULL) {
1042 mesg[SIGKRSTA].iname = "KRSTA";
1043 mesg[SIGKRSTA].pname = CSAVS(2, 103, "restart of kernel");
1046 #endif /* SIGKRSTA */
1050 if (mesg[SIGXXMU].pname == NULL) {
1051 mesg[SIGXXMU].iname = "XXMU";
1052 mesg[SIGXXMU].pname = CSAVS(2, 104, "exeeded XMU size limit");
1054 #endif /* SIGXXMU */
1058 if (mesg[SIGXRLG0].pname == NULL) {
1059 mesg[SIGXRLG0].iname = "XRLG0";
1060 mesg[SIGXRLG0].pname = CSAVS(2, 105, "exeeded RLG0 limit");
1062 #endif /* SIGXRLG0 */
1066 if (mesg[SIGXRLG1].pname == NULL) {
1067 mesg[SIGXRLG1].iname = "XRLG1";
1068 mesg[SIGXRLG1].pname = CSAVS(2, 106, "exeeded RLG1 limit");
1070 #endif /* SIGXRLG1 */
1074 if (mesg[SIGXRLG2].pname == NULL) {
1075 mesg[SIGXRLG2].iname = "XRLG2";
1076 mesg[SIGXRLG2].pname = CSAVS(2, 107, "exeeded RLG2 limit");
1078 #endif /* SIGXRLG2 */
1082 if (mesg[SIGXRLG3].pname == NULL) {
1083 mesg[SIGXRLG3].iname = "XRLG3";
1084 mesg[SIGXRLG3].pname = CSAVS(2, 108, "exeeded RLG3 limit");
1086 #endif /* SIGXRLG3 */
1091 if (mesg[SIGCKPT].pname == NULL) {
1092 mesg[SIGCKPT].iname = "CKPT";
1093 mesg[SIGCKPT].pname = CSAVS(2, 109, "CheckPoint");
1095 #endif /* SIGCKPT */
1099 if (mesg[SIGCKPTEXIT].pname == NULL) {
1100 mesg[SIGCKPTEXIT].iname = "CKPTEXIT";
1101 mesg[SIGCKPTEXIT].pname = CSAVS(2, 110, "CheckPointExit");
1103 #endif /* SIGCKPTEXIT */