1 /* $Header: /p/tcsh/cvsroot/tcsh/sh.init.c,v 3.63 2006/08/23 01:49:32 mitr Exp $ */
3 * sh.init.c: Function and signal tables
6 * Copyright (c) 1980, 1991 The Regents of the University of California.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 RCSID("$tcsh: sh.init.c,v 3.63 2006/08/23 01:49:32 mitr Exp $")
46 const struct biltins bfunc
[] = {
47 { ":", dozip
, 0, INF
},
48 { "@", dolet
, 0, INF
},
49 { "alias", doalias
, 0, INF
},
50 { "alloc", showall
, 0, 1 },
52 { "att", doatt
, 0, INF
},
54 { "bg", dobg
, 0, INF
},
55 { "bindkey", dobindkey
, 0, 8 },
56 { "break", dobreak
, 0, 0 },
57 { "breaksw", doswbrk
, 0, 0 },
59 { "bs2cmd", dobs2cmd
, 1, INF
},
61 { "builtins", dobuiltins
, 0, 0 },
63 { "bye", goodbye
, 0, 0 },
65 { "case", dozip
, 0, 1 },
66 { "cd", dochngd
, 0, INF
},
67 { "chdir", dochngd
, 0, INF
},
68 { "complete", docomplete
, 0, INF
},
69 { "continue", docontin
, 0, 0 },
70 { "default", dozip
, 0, 0 },
71 { "dirs", dodirs
, 0, INF
},
72 #if defined(_CRAY) && !defined(_CRAYMPP)
73 { "dmmode", dodmmode
, 0, 1 },
74 #endif /* _CRAY && !_CRAYMPP */
75 { "echo", doecho
, 0, INF
},
76 { "echotc", doechotc
, 0, INF
},
77 { "else", doelse
, 0, INF
},
78 { "end", doend
, 0, 0 },
79 { "endif", dozip
, 0, 0 },
80 { "endsw", dozip
, 0, 0 },
81 { "eval", doeval
, 0, INF
},
82 { "exec", execash
, 1, INF
},
83 { "exit", doexit
, 0, INF
},
84 { "fg", dofg
, 0, INF
},
85 { "filetest", dofiletest
, 2, INF
},
86 { "foreach", doforeach
, 3, INF
},
88 { "getspath", dogetspath
, 0, 0 },
89 { "getxvers", dogetxvers
, 0, 0 },
91 { "glob", doglob
, 0, INF
},
92 { "goto", dogoto
, 1, 1 },
93 { "hashstat", hashstat
, 0, 0 },
94 { "history", dohist
, 0, 2 },
95 { "hup", dohup
, 0, INF
},
96 { "if", doif
, 1, INF
},
98 { "inlib", doinlib
, 1, INF
},
100 { "jobs", dojobs
, 0, 1 },
101 { "kill", dokill
, 1, INF
},
103 { "limit", dolimit
, 0, 3 },
104 #endif /* !HAVENOLIMIT */
106 { "linedit", doecho
, 0, INF
},
107 #endif /* OBSOLETE */
108 #if !defined(HAVENOUTMP) && !defined(KAI)
109 { "log", dolog
, 0, 0 },
110 #endif /* !HAVENOUTMP && !KAI */
111 { "login", dologin
, 0, 1 },
112 { "logout", dologout
, 0, 0 },
113 { "ls-F", dolist
, 0, INF
},
115 { "migrate", domigrate
, 1, INF
},
118 { "newgrp", donewgrp
, 0, 2 },
120 { "nice", donice
, 0, INF
},
121 { "nohup", donohup
, 0, INF
},
122 { "notify", donotify
, 0, INF
},
123 { "onintr", doonintr
, 0, 2 },
124 { "popd", dopopd
, 0, INF
},
125 { "printenv", doprintenv
, 0, 1 },
126 { "pushd", dopushd
, 0, INF
},
127 { "rehash", dohash
, 0, 3 },
128 { "repeat", dorepeat
, 2, INF
},
130 { "rootnode", dorootnode
, 1, 1 },
132 { "sched", dosched
, 0, INF
},
133 { "set", doset
, 0, INF
},
134 { "setenv", dosetenv
, 0, 2 },
136 { "setpath", dosetpath
, 0, INF
},
139 { "setspath", dosetspath
, 1, INF
},
141 { "settc", dosettc
, 2, 2 },
142 { "setty", dosetty
, 0, INF
},
144 { "setxvers", dosetxvers
, 0, 1 },
146 { "shift", shift
, 0, 1 },
147 { "source", dosource
, 1, INF
},
148 { "stop", dostop
, 1, INF
},
149 { "suspend", dosuspend
, 0, 0 },
150 { "switch", doswitch
, 1, INF
},
151 { "telltc", dotelltc
, 0, INF
},
153 { "termname", dotermname
, 0, 1 },
155 { "time", dotime
, 0, INF
},
157 { "ucb", doucb
, 0, INF
},
159 { "umask", doumask
, 0, 1 },
160 { "unalias", unalias
, 1, INF
},
161 { "uncomplete", douncomplete
, 1, INF
},
162 { "unhash", dounhash
, 0, 0 },
163 #if defined(masscomp) || defined(_CX_UX)
164 { "universe", douniverse
, 0, INF
},
165 #endif /* masscomp || _CX_UX */
167 { "unlimit", dounlimit
, 0, INF
},
168 #endif /* !HAVENOLIMIT */
169 { "unset", unset
, 1, INF
},
170 { "unsetenv", dounsetenv
, 1, INF
},
172 { "ver", dover
, 0, INF
},
174 { "wait", dowait
, 0, 0 },
176 { "warp", dowarp
, 0, 2 },
178 #if !defined(HAVENOUTMP) && defined(KAI)
179 { "watchlog", dolog
, 0, 0 },
180 #endif /* !HAVENOUTMP && KAI */
181 { "where", dowhere
, 1, INF
},
182 { "which", dowhich
, 1, INF
},
183 { "while", dowhile
, 1, INF
}
185 int nbfunc
= sizeof bfunc
/ sizeof *bfunc
;
187 struct srch srchn
[] = {
189 { "break", TC_BREAK
},
190 { "breaksw", TC_BRKSW
},
192 { "default", TC_DEFAULT
},
195 { "endif", TC_ENDIF
},
196 { "endsw", TC_ENDSW
},
198 { "foreach", TC_FOREACH
},
201 { "label", TC_LABEL
},
203 { "switch", TC_SWITCH
},
204 { "while", TC_WHILE
}
206 int nsrchn
= sizeof srchn
/ sizeof *srchn
;
210 * Note: For some machines, (hpux eg.)
211 * NSIG = number of signals + 1...
212 * so we define 33 or 65 (POSIX) signals for
216 /* We define NUMSIG to avoid changing NSIG or MAXSIG */
217 #if defined(POSIX) && !defined(__CYGWIN__)
223 int nsig
= NUMSIG
- 1; /* This should be the number of real signals */
224 /* not counting signal 0 */
225 struct mesg mesg
[NUMSIG
]; /* Arrays start at [0] so we initialize from */
226 /* 0 to 32 or 64, the max real signal number */
235 for (i
= 0; i
< NUMSIG
; i
++) {
236 xfree((char *)(intptr_t)mesg
[i
].pname
);
237 mesg
[i
].pname
= NULL
;
239 #endif /* NLS_CATALOGS */
241 #if defined(SIGNULL) || defined(DECOSF1)
244 # endif /* !SIGNULL */
245 if (mesg
[SIGNULL
].pname
== NULL
) {
246 mesg
[SIGNULL
].iname
= "NULL";
247 mesg
[SIGNULL
].pname
= CSAVS(2, 1, "Null signal");
249 #endif /* SIGNULL || DECOSF1 */
252 if (mesg
[SIGHUP
].pname
== NULL
) {
253 mesg
[SIGHUP
].iname
= "HUP";
254 mesg
[SIGHUP
].pname
= CSAVS(2, 2, "Hangup");
259 if (mesg
[SIGINT
].pname
== NULL
) {
260 mesg
[SIGINT
].iname
= "INT";
261 mesg
[SIGINT
].pname
= CSAVS(2, 3, "Interrupt");
266 if (mesg
[SIGQUIT
].pname
== NULL
) {
267 mesg
[SIGQUIT
].iname
= "QUIT";
268 mesg
[SIGQUIT
].pname
= CSAVS(2, 4, "Quit");
273 if (mesg
[SIGILL
].pname
== NULL
) {
274 mesg
[SIGILL
].iname
= "ILL";
275 mesg
[SIGILL
].pname
= CSAVS(2, 5, "Illegal instruction");
280 if (mesg
[SIGTRAP
].pname
== NULL
) {
281 mesg
[SIGTRAP
].iname
= "TRAP";
282 mesg
[SIGTRAP
].pname
= CSAVS(2, 6, "Trace/BPT trap");
287 if (mesg
[SIGABRT
].pname
== NULL
) {
288 mesg
[SIGABRT
].iname
= "ABRT";
289 mesg
[SIGABRT
].pname
= CSAVS(2, 7, "Abort");
294 if (mesg
[SIGIOT
].pname
== NULL
) {
295 mesg
[SIGIOT
].iname
= "IOT";
296 mesg
[SIGIOT
].pname
= CSAVS(2, 8, "IOT trap");
302 if (mesg
[SIGDANGER
].pname
== NULL
) {
303 mesg
[SIGDANGER
].iname
= "DANGER";
304 mesg
[SIGDANGER
].pname
= CSAVS(2, 9, "System Crash Imminent");
306 #endif /* SIGDANGER */
310 if (mesg
[SIGERR
].pname
== NULL
) {
311 mesg
[SIGERR
].iname
= "ERR";
312 mesg
[SIGERR
].pname
= CSAVS(2, 10, "Error exit");
317 if (mesg
[SIGEMT
].pname
== NULL
) {
318 mesg
[SIGEMT
].iname
= "EMT";
319 mesg
[SIGEMT
].pname
= CSAVS(2, 11, "EMT trap");
324 if (mesg
[SIGFPE
].pname
== NULL
) {
325 mesg
[SIGFPE
].iname
= "FPE";
326 mesg
[SIGFPE
].pname
= CSAVS(2, 12, "Floating exception");
331 if (mesg
[SIGKILL
].pname
== NULL
) {
332 mesg
[SIGKILL
].iname
= "KILL";
333 mesg
[SIGKILL
].pname
= CSAVS(2, 13, "Killed");
338 if (mesg
[SIGUSR1
].pname
== NULL
) {
339 mesg
[SIGUSR1
].iname
= "USR1";
340 mesg
[SIGUSR1
].pname
= CSAVS(2, 14, "User signal 1");
345 if (mesg
[SIGUSR2
].pname
== NULL
) {
346 mesg
[SIGUSR2
].iname
= "USR2";
347 mesg
[SIGUSR2
].pname
= CSAVS(2, 15, "User signal 2");
352 if (mesg
[SIGSEGV
].pname
== NULL
) {
353 mesg
[SIGSEGV
].iname
= "SEGV";
354 mesg
[SIGSEGV
].pname
= CSAVS(2, 16, "Segmentation fault");
359 if (mesg
[SIGBUS
].pname
== NULL
) {
360 mesg
[SIGBUS
].iname
= "BUS";
361 mesg
[SIGBUS
].pname
= CSAVS(2, 17, "Bus error");
366 /* _CRAY || IBMAIX */
367 if (mesg
[SIGPRE
].pname
== NULL
) {
368 mesg
[SIGPRE
].iname
= "PRE";
369 mesg
[SIGPRE
].pname
= CSAVS(2, 18, "Program range error");
375 if (mesg
[SIGORE
].pname
== NULL
) {
376 mesg
[SIGORE
].iname
= "ORE";
377 mesg
[SIGORE
].pname
= CSAVS(2, 19, "Operand range error");
382 if (mesg
[SIGSYS
].pname
== NULL
) {
383 mesg
[SIGSYS
].iname
= "SYS";
384 mesg
[SIGSYS
].pname
= CSAVS(2, 20, "Bad system call");
389 if (mesg
[SIGPIPE
].pname
== NULL
) {
390 mesg
[SIGPIPE
].iname
= "PIPE";
391 mesg
[SIGPIPE
].pname
= CSAVS(2, 21, "Broken pipe");
396 if (mesg
[SIGALRM
].pname
== NULL
) {
397 mesg
[SIGALRM
].iname
= "ALRM";
398 mesg
[SIGALRM
].pname
= CSAVS(2, 22, "Alarm clock");
403 if (mesg
[SIGTERM
].pname
== NULL
) {
404 mesg
[SIGTERM
].iname
= "TERM";
405 mesg
[SIGTERM
].pname
= CSAVS(2, 23, "Terminated");
409 /* SIGCLD vs SIGCHLD */
410 #if !defined(SIGCHLD) || defined(SOLARIS2) || defined(apollo) || defined(__EMX__)
411 /* If we don't define SIGCHLD, or our OS prefers SIGCLD to SIGCHLD, */
412 /* check for SIGCLD */
414 if (mesg
[SIGCLD
].pname
== NULL
) {
415 mesg
[SIGCLD
].iname
= "CLD";
417 mesg
[SIGCLD
].pname
= CSAVS(2, 24, "Child status change");
418 # else /* !BSDJOBS */
419 mesg
[SIGCLD
].pname
= CSAVS(2, 25, "Death of child");
420 # endif /* BSDJOBS */
423 #else /* !(!SIGCHLD || SOLARIS2 || apollo || __EMX__) */
424 /* We probably define SIGCHLD */
426 if (mesg
[SIGCHLD
].pname
== NULL
) {
427 mesg
[SIGCHLD
].iname
= "CHLD";
429 mesg
[SIGCHLD
].pname
= CSAVS(2, 27, "Child stopped or exited");
430 # else /* !BSDJOBS */
431 mesg
[SIGCHLD
].pname
= CSAVS(2, 28, "Child exited");
432 # endif /* BSDJOBS */
434 # endif /* SIGCHLD */
435 #endif /* !SIGCHLD || SOLARIS2 || apollo || __EMX__ */
439 if (mesg
[SIGAPOLLO
].pname
== NULL
) {
440 mesg
[SIGAPOLLO
].iname
= "APOLLO";
441 mesg
[SIGAPOLLO
].pname
= CSAVS(2, 26, "Apollo-specific fault");
443 #endif /* SIGAPOLLO */
446 if (mesg
[SIGPWR
].pname
== NULL
) {
447 mesg
[SIGPWR
].iname
= "PWR";
448 mesg
[SIGPWR
].pname
= CSAVS(2, 29, "Power failure");
453 if (mesg
[SIGLOST
].pname
== NULL
) {
454 mesg
[SIGLOST
].iname
= "LOST";
455 mesg
[SIGLOST
].pname
= CSAVS(2, 30, "Resource Lost");
461 if (mesg
[SIGBREAK
].pname
== NULL
) {
462 mesg
[SIGBREAK
].iname
= "BREAK";
463 mesg
[SIGBREAK
].pname
= CSAVS(2, 31, "Break (Ctrl-Break)");
465 #endif /* SIGBREAK */
468 # if !defined(SIGPOLL) || SIGPOLL != SIGIO
469 if (mesg
[SIGIO
].pname
== NULL
) {
470 mesg
[SIGIO
].iname
= "IO";
472 mesg
[SIGIO
].pname
= CSAVS(2, 32, "Input/output possible signal");
474 mesg
[SIGIO
].pname
= CSAVS(2, 33, "Asynchronous I/O (select)");
477 # endif /* !SIGPOLL || SIGPOLL != SIGIO */
481 if (mesg
[SIGURG
].pname
== NULL
) {
482 mesg
[SIGURG
].iname
= "URG";
483 mesg
[SIGURG
].pname
= CSAVS(2, 34, "Urgent condition on I/O channel");
489 if (mesg
[SIGMT
].pname
== NULL
) {
490 mesg
[SIGMT
].iname
= "MT";
491 mesg
[SIGMT
].pname
= CSAVS(2, 35, "Multitasking wake-up");
497 if (mesg
[SIGMTKILL
].pname
== NULL
) {
498 mesg
[SIGMTKILL
].iname
= "MTKILL";
499 mesg
[SIGMTKILL
].pname
= CSAVS(2, 36, "Multitasking kill");
501 #endif /* SIGMTKILL */
505 if (mesg
[SIGBUFIO
].pname
== NULL
) {
506 mesg
[SIGBUFIO
].iname
= "BUFIO";
507 mesg
[SIGBUFIO
].pname
= CSAVS(2, 37,
508 "Fortran asynchronous I/O completion");
510 #endif /* SIGBUFIO */
514 if (mesg
[SIGRECOVERY
].pname
== NULL
) {
515 mesg
[SIGRECOVERY
].iname
= "RECOVERY";
516 mesg
[SIGRECOVERY
].pname
= CSAVS(2, 38, "Recovery");
518 #endif /* SIGRECOVERY */
522 if (mesg
[SIGUME
].pname
== NULL
) {
523 mesg
[SIGUME
].iname
= "UME";
524 mesg
[SIGUME
].pname
= CSAVS(2, 39, "Uncorrectable memory error");
530 if (mesg
[SIGCPULIM
].pname
== NULL
) {
531 mesg
[SIGCPULIM
].iname
= "CPULIM";
532 mesg
[SIGCPULIM
].pname
= CSAVS(2, 40, "CPU time limit exceeded");
534 #endif /* SIGCPULIM */
538 if (mesg
[SIGSHUTDN
].pname
== NULL
) {
539 mesg
[SIGSHUTDN
].iname
= "SHUTDN";
540 mesg
[SIGSHUTDN
].pname
= CSAVS(2, 41, "System shutdown imminent");
542 #endif /* SIGSHUTDN */
546 if (mesg
[SIGNOWAK
].pname
== NULL
) {
547 mesg
[SIGNOWAK
].iname
= "NOWAK";
548 mesg
[SIGNOWAK
].pname
= CSAVS(2, 42,
549 "Micro-tasking group-no wakeup flag set");
551 #endif /* SIGNOWAK */
555 if (mesg
[SIGTHERR
].pname
== NULL
) {
556 mesg
[SIGTHERR
].iname
= "THERR";
557 mesg
[SIGTHERR
].pname
= CSAVS(2, 43,
558 "Thread error - (use cord -T for detailed info)");
560 #endif /* SIGTHERR */
564 if (mesg
[SIGRPE
].pname
== NULL
) {
565 mesg
[SIGRPE
].pname
= CSAVS(2, 44, "CRAY Y-MP register parity error");
566 mesg
[SIGRPE
].iname
= "RPE";
571 if (mesg
[SIGINFO
].pname
== NULL
) {
572 mesg
[SIGINFO
].iname
= "INFO";
573 mesg
[SIGINFO
].pname
= CSAVS(2, 45, "Information request");
578 if (mesg
[SIGSTOP
].pname
== NULL
) {
579 mesg
[SIGSTOP
].iname
= "STOP";
581 mesg
[SIGSTOP
].pname
= CSAVS(2, 46, "Suspended (signal)");
582 # else /* !SUSPENDED */
583 mesg
[SIGSTOP
].pname
= CSAVS(2, 47, "Stopped (signal)");
584 # endif /* SUSPENDED */
589 if (mesg
[SIGTSTP
].pname
== NULL
) {
590 mesg
[SIGTSTP
].iname
= "TSTP";
592 mesg
[SIGTSTP
].pname
= CSAVS(2, 48, "Suspended");
593 # else /* !SUSPENDED */
594 mesg
[SIGTSTP
].pname
= CSAVS(2, 49, "Stopped");
595 # endif /* SUSPENDED */
600 if (mesg
[SIGCONT
].pname
== NULL
) {
601 mesg
[SIGCONT
].iname
= "CONT";
602 mesg
[SIGCONT
].pname
= CSAVS(2, 50, "Continued");
607 if (mesg
[SIGTTIN
].pname
== NULL
) {
608 mesg
[SIGTTIN
].iname
= "TTIN";
610 mesg
[SIGTTIN
].pname
= CSAVS(2, 51, "Suspended (tty input)");
611 # else /* !SUSPENDED */
612 mesg
[SIGTTIN
].pname
= CSAVS(2, 52, "Stopped (tty input)");
613 # endif /* SUSPENDED */
618 if (mesg
[SIGTTOU
].pname
== NULL
) {
619 mesg
[SIGTTOU
].iname
= "TTOU";
621 mesg
[SIGTTOU
].pname
= CSAVS(2, 53, "Suspended (tty output)");
622 # else /* SUSPENDED */
623 mesg
[SIGTTOU
].pname
= CSAVS(2, 54, "Stopped (tty output)");
624 # endif /* SUSPENDED */
630 if (mesg
[SIGWIND
].pname
== NULL
) {
631 mesg
[SIGWIND
].iname
= "WIND";
632 mesg
[SIGWIND
].pname
= CSAVS(2, 55, "Window status changed");
637 if (mesg
[SIGWINDOW
].pname
== NULL
) {
638 mesg
[SIGWINDOW
].iname
= "WINDOW";
639 mesg
[SIGWINDOW
].pname
= CSAVS(2, 56, "Window size changed");
641 #endif /* SIGWINDOW */
644 if (mesg
[SIGWINCH
].pname
== NULL
) {
645 mesg
[SIGWINCH
].iname
= "WINCH";
646 mesg
[SIGWINCH
].pname
= CSAVS(2, 56, "Window size changed");
648 #endif /* SIGWINCH */
652 if (mesg
[SIGPHONE
].pname
== NULL
) {
653 mesg
[SIGPHONE
].iname
= "PHONE";
654 mesg
[SIGPHONE
].pname
= CSAVS(2, 57, "Phone status changed");
656 # endif /* SIGPHONE */
659 if (mesg
[SIGXCPU
].pname
== NULL
) {
660 mesg
[SIGXCPU
].iname
= "XCPU";
661 mesg
[SIGXCPU
].pname
= CSAVS(2, 58, "Cputime limit exceeded");
666 if (mesg
[SIGXFSZ
].pname
== NULL
) {
667 mesg
[SIGXFSZ
].iname
= "XFSZ";
668 mesg
[SIGXFSZ
].pname
= CSAVS(2, 59, "Filesize limit exceeded");
673 if (mesg
[SIGVTALRM
].pname
== NULL
) {
674 mesg
[SIGVTALRM
].iname
= "VTALRM";
675 mesg
[SIGVTALRM
].pname
= CSAVS(2, 60, "Virtual time alarm");
677 #endif /* SIGVTALRM */
680 if (mesg
[SIGPROF
].pname
== NULL
) {
681 mesg
[SIGPROF
].iname
= "PROF";
682 mesg
[SIGPROF
].pname
= CSAVS(2, 61, "Profiling time alarm");
688 if (mesg
[SIGDIL
].pname
== NULL
) {
689 mesg
[SIGDIL
].iname
= "DIL";
690 mesg
[SIGDIL
].pname
= CSAVS(2, 62, "DIL signal");
695 if (mesg
[SIGPOLL
].pname
== NULL
) {
696 mesg
[SIGPOLL
].iname
= "POLL";
697 mesg
[SIGPOLL
].pname
= CSAVS(2, 63, "Pollable event occured");
703 if (mesg
[SIGWAITING
].pname
== NULL
) {
704 mesg
[SIGWAITING
].iname
= "WAITING";
705 mesg
[SIGWAITING
].pname
= CSAVS(2, 64, "Process's lwps are blocked");
707 #endif /* SIGWAITING */
711 if (mesg
[SIGLWP
].pname
== NULL
) {
712 mesg
[SIGLWP
].iname
= "LWP";
713 mesg
[SIGLWP
].pname
= CSAVS(2, 65, "Special LWP signal");
719 if (mesg
[SIGFREEZE
].pname
== NULL
) {
720 mesg
[SIGFREEZE
].iname
= "FREEZE";
721 mesg
[SIGFREEZE
].pname
= CSAVS(2, 66, "Special CPR Signal");
723 #endif /* SIGFREEZE */
727 if (mesg
[SIGTHAW
].pname
== NULL
) {
728 mesg
[SIGTHAW
].iname
= "THAW";
729 mesg
[SIGTHAW
].pname
= CSAVS(2, 67, "Special CPR Signal");
735 if (mesg
[SIGCANCEL
].pname
== NULL
) {
736 mesg
[SIGCANCEL
].iname
= "CANCEL";
737 mesg
[SIGCANCEL
].pname
= CSAVS(2, 109,
738 "Thread cancellation signal used by libthread");
740 #endif /* SIGCANCEL */
743 * Careful, some OS's (HP/UX 10.0) define these as -1
747 * Cannot do this at compile time; Solaris2 uses _sysconf for these
749 if (SIGRTMIN
> 0 && SIGRTMIN
< NUMSIG
) {
750 if (mesg
[SIGRTMIN
].pname
== NULL
) {
751 mesg
[SIGRTMIN
].iname
= "RTMIN";
752 mesg
[SIGRTMIN
].pname
= CSAVS(2, 68, "First Realtime Signal");
755 if (SIGRTMIN
+ 1 < SIGRTMAX
&& SIGRTMIN
+ 1 < NUMSIG
&&
756 mesg
[SIGRTMIN
+1].pname
== NULL
) {
757 mesg
[SIGRTMIN
+1].iname
= "RTMIN+1";
758 mesg
[SIGRTMIN
+1].pname
= CSAVS(2, 69, "Second Realtime Signal");
761 if (SIGRTMIN
+ 2 < SIGRTMAX
&& SIGRTMIN
+ 2 < NUMSIG
&&
762 mesg
[SIGRTMIN
+2].pname
== NULL
) {
763 mesg
[SIGRTMIN
+2].iname
= "RTMIN+2";
764 mesg
[SIGRTMIN
+2].pname
= CSAVS(2, 70, "Third Realtime Signal");
767 if (SIGRTMIN
+ 3 < SIGRTMAX
&& SIGRTMIN
+ 3 < NUMSIG
&&
768 mesg
[SIGRTMIN
+3].pname
== NULL
) {
769 mesg
[SIGRTMIN
+3].iname
= "RTMIN+3";
770 mesg
[SIGRTMIN
+3].pname
= CSAVS(2, 71, "Fourth Realtime Signal");
773 #endif /* SIGRTMIN */
777 * Cannot do this at compile time; Solaris2 uses _sysconf for these
779 if (SIGRTMAX
> 0 && SIGRTMAX
< NUMSIG
) {
780 if (SIGRTMAX
- 3 > SIGRTMIN
&& mesg
[SIGRTMAX
-3].pname
== NULL
) {
781 mesg
[SIGRTMAX
-3].iname
= "RTMAX-3";
782 mesg
[SIGRTMAX
-3].pname
= CSAVS(2, 72,
783 "Fourth Last Realtime Signal");
786 if (SIGRTMAX
- 2 > SIGRTMIN
&& mesg
[SIGRTMAX
-2].pname
== NULL
) {
787 mesg
[SIGRTMAX
-2].iname
= "RTMAX-2";
788 mesg
[SIGRTMAX
-2].pname
= CSAVS(2, 73,
789 "Third Last Realtime Signal");
792 if (SIGRTMAX
- 1 > SIGRTMIN
&& mesg
[SIGRTMAX
-1].pname
== NULL
) {
793 mesg
[SIGRTMAX
-1].iname
= "RTMAX-1";
794 mesg
[SIGRTMAX
-1].pname
= CSAVS(2, 74,
795 "Second Last Realtime Signal");
798 if (SIGRTMAX
> SIGRTMIN
&& mesg
[SIGRTMAX
].pname
== NULL
) {
799 mesg
[SIGRTMAX
].iname
= "RTMAX";
800 mesg
[SIGRTMAX
].pname
= CSAVS(2, 75,
801 "Last Realtime Signal");
804 #endif /* SIGRTMAX */
809 if (mesg
[SIGAIO
].pname
== NULL
) {
810 mesg
[SIGAIO
].iname
= "AIO";
811 mesg
[SIGAIO
].pname
= CSAVS(2, 76, "LAN Asyncronous I/O");
817 if (mesg
[SIGPTY
].pname
== NULL
) {
818 mesg
[SIGPTY
].iname
= "PTY";
819 mesg
[SIGPTY
].pname
= CSAVS(2, 77, "PTY read/write availability");
825 if (mesg
[SIGIOINT
].pname
== NULL
) {
826 mesg
[SIGIOINT
].iname
= "IOINT";
827 mesg
[SIGIOINT
].pname
= CSAVS(2, 78, "I/O intervention required");
829 #endif /* SIGIOINT */
833 if (mesg
[SIGGRANT
].pname
== NULL
) {
834 mesg
[SIGGRANT
].iname
= "GRANT";
835 mesg
[SIGGRANT
].pname
= CSAVS(2, 79, "HFT monitor mode granted");
837 #endif /* SIGGRANT */
841 if (mesg
[SIGRETRACT
].pname
== NULL
) {
842 mesg
[SIGRETRACT
].iname
= "RETRACT";
843 mesg
[SIGRETRACT
].pname
= CSAVS(2, 80,
844 "HFT monitor mode should be relinguished");
846 #endif /* SIGRETRACT */
850 if (mesg
[SIGSOUND
].pname
== NULL
) {
851 mesg
[SIGSOUND
].iname
= "SOUND";
852 mesg
[SIGSOUND
].pname
= CSAVS(2, 81, "HFT sound control has completed");
854 #endif /* SIGSOUND */
858 if (mesg
[SIGSMSG
].pname
== NULL
) {
859 mesg
[SIGSMSG
].iname
= "SMSG";
860 mesg
[SIGSMSG
].pname
= CSAVS(2, 82, "Data in HFT ring buffer");
866 if (mesg
[SIGMIGRATE
].pname
== NULL
) {
867 mesg
[SIGMIGRATE
].iname
= "MIGRATE";
868 mesg
[SIGMIGRATE
].pname
= CSAVS(2, 83, "Migrate process");
870 #endif /* SIGMIGRATE */
874 if (mesg
[SIGSAK
].pname
== NULL
) {
875 mesg
[SIGSAK
].iname
= "SAK";
876 mesg
[SIGSAK
].pname
= CSAVS(2, 84, "Secure attention key");
882 if (mesg
[SIGRESCHED
].pname
== NULL
) {
883 mesg
[SIGRESCHED
].iname
= "RESCHED";
884 mesg
[SIGRESCHED
].pname
= CSAVS(2, 85, "Reschedule");
886 #endif /* SIGRESCHED */
890 if (mesg
[SIGDEBUG
].pname
== NULL
) {
891 mesg
[SIGDEBUG
].iname
= "DEBUG";
892 mesg
[SIGDEBUG
].pname
= CSAVS(2, 86, "Signaling SS$_DEBUG");
894 #endif /* SIGDEBUG */
898 if (mesg
[SIGPRIO
].pname
== NULL
) {
899 mesg
[SIGPRIO
].iname
= "PRIO";
900 mesg
[SIGPRIO
].pname
= CSAVS(2, 87, "Priority changed");
906 if (mesg
[SIGDLK
].pname
== NULL
) {
907 mesg
[SIGDLK
].iname
= "DLK";
908 mesg
[SIGDLK
].pname
= CSAVS(2, 88, "True deadlock detected");
914 if (mesg
[SIGTINT
].pname
== NULL
) {
915 mesg
[SIGTINT
].iname
= "TINT";
916 mesg
[SIGTINT
].pname
= CSAVS(2, 89, "New input character");
921 if (mesg
[SIGSTKFLT
].pname
== NULL
) {
922 mesg
[SIGSTKFLT
].iname
= "STKFLT";
923 mesg
[SIGSTKFLT
].pname
= CSAVS(2, 90, "Stack limit exceeded");
925 #endif /* SIGSTKFLT */
928 if (mesg
[SIGUNUSED
].pname
== NULL
) {
929 mesg
[SIGUNUSED
].iname
= "UNUSED";
930 mesg
[SIGUNUSED
].pname
= CSAVS(2, 91, "Unused signal");
932 #endif /* SIGUNUSED */
936 if (mesg
[SIGOVLY
].pname
== NULL
) {
937 mesg
[SIGOVLY
].iname
= "OVLY";
938 mesg
[SIGOVLY
].pname
= CSAVS(2, 92, "LM overlay");
944 if (mesg
[SIGFRZ
].pname
== NULL
) {
945 mesg
[SIGFRZ
].iname
= "FRZ";
946 mesg
[SIGFRZ
].pname
= CSAVS(2, 93, "system freeze");
952 if (mesg
[SIGDFRZ
].pname
== NULL
) {
953 mesg
[SIGDFRZ
].iname
= "DFRZ";
954 mesg
[SIGDFRZ
].pname
= CSAVS(2, 94, "system defreeze");
960 if (mesg
[SIGDEAD
].pname
== NULL
) {
961 mesg
[SIGDEAD
].iname
= "DEAD";
962 mesg
[SIGDEAD
].pname
= CSAVS(2, 95, "dead lock");
968 if (mesg
[SIGXMEM
].pname
== NULL
) {
969 mesg
[SIGXMEM
].iname
= "XMEM";
970 mesg
[SIGXMEM
].pname
= CSAVS(2, 96, "exceeded memory size limit");
976 if (mesg
[SIGXDSZ
].pname
== NULL
) {
977 mesg
[SIGXDSZ
].iname
= "XDSZ";
978 mesg
[SIGXDSZ
].pname
= CSAVS(2, 97, "exceeded data size limit");
984 if (mesg
[SIGMEM32
].pname
== NULL
) {
985 mesg
[SIGMEM32
].iname
= "MEM32";
986 mesg
[SIGMEM32
].pname
= CSAVS(2, 98, "exceeded memory size limit of 32KB");
988 #endif /* SIGMEM32 */
992 if (mesg
[SIGNMEM
].pname
== NULL
) {
993 mesg
[SIGNMEM
].iname
= "NMEM";
994 mesg
[SIGNMEM
].pname
= CSAVS(2, 99, "exce error for no memory");
1000 if (mesg
[SIGCHKP
].pname
== NULL
) {
1001 mesg
[SIGCHKP
].iname
= "CHKP";
1002 mesg
[SIGCHKP
].pname
= CSAVS(2, 100, "check point start");
1004 #endif /* SIGCHKP */
1009 if (mesg
[SIGKCHKP
].pname
== NULL
) {
1010 mesg
[SIGKCHKP
].iname
= "KCHKP";
1011 mesg
[SIGKCHKP
].pname
= CSAVS(2, 101, "check point start of kernel");
1014 #endif /* SIGKCHKP */
1018 if (mesg
[SIGRSTA
].pname
== NULL
) {
1019 mesg
[SIGRSTA
].iname
= "RSTA";
1020 mesg
[SIGRSTA
].pname
= CSAVS(2, 102, "restart start");
1022 #endif /* SIGRSTA */
1027 if (mesg
[SIGKRSTA
].pname
== NULL
) {
1028 mesg
[SIGKRSTA
].iname
= "KRSTA";
1029 mesg
[SIGKRSTA
].pname
= CSAVS(2, 103, "restart of kernel");
1032 #endif /* SIGKRSTA */
1036 if (mesg
[SIGXXMU
].pname
== NULL
) {
1037 mesg
[SIGXXMU
].iname
= "XXMU";
1038 mesg
[SIGXXMU
].pname
= CSAVS(2, 104, "exeeded XMU size limit");
1040 #endif /* SIGXXMU */
1044 if (mesg
[SIGXRLG0
].pname
== NULL
) {
1045 mesg
[SIGXRLG0
].iname
= "XRLG0";
1046 mesg
[SIGXRLG0
].pname
= CSAVS(2, 105, "exeeded RLG0 limit");
1048 #endif /* SIGXRLG0 */
1052 if (mesg
[SIGXRLG1
].pname
== NULL
) {
1053 mesg
[SIGXRLG1
].iname
= "XRLG1";
1054 mesg
[SIGXRLG1
].pname
= CSAVS(2, 106, "exeeded RLG1 limit");
1056 #endif /* SIGXRLG1 */
1060 if (mesg
[SIGXRLG2
].pname
== NULL
) {
1061 mesg
[SIGXRLG2
].iname
= "XRLG2";
1062 mesg
[SIGXRLG2
].pname
= CSAVS(2, 107, "exeeded RLG2 limit");
1064 #endif /* SIGXRLG2 */
1068 if (mesg
[SIGXRLG3
].pname
== NULL
) {
1069 mesg
[SIGXRLG3
].iname
= "XRLG3";
1070 mesg
[SIGXRLG3
].pname
= CSAVS(2, 108, "exeeded RLG3 limit");
1072 #endif /* SIGXRLG3 */
1076 if (mesg
[SIGCKPT
].pname
== NULL
) {
1077 mesg
[SIGCKPT
].iname
= "CKPT";
1078 mesg
[SIGCKPT
].pname
= CSAVS(2, 109, "CheckPoint");
1080 #endif /* SIGCKPT */
1084 if (mesg
[SIGCKPTEXIT
].pname
== NULL
) {
1085 mesg
[SIGCKPTEXIT
].iname
= "CKPTEXIT";
1086 mesg
[SIGCKPTEXIT
].pname
= CSAVS(2, 110, "CheckPointExit");
1088 #endif /* SIGCKPTEXIT */