Commit | Line | Data |
---|---|---|
c906108c SS |
1 | #include <signal.h> |
2 | ||
3 | #ifdef __sh__ | |
4 | #define signal(a,b) /* Signals not supported on this target - make them go away */ | |
5 | #endif | |
6 | ||
7 | /* Signal handlers, we set breakpoints in them to make sure that the | |
8 | signals really get delivered. */ | |
9 | ||
10 | void | |
11 | handle_ABRT (sig) | |
12 | int sig; | |
13 | { | |
14 | } | |
15 | ||
16 | void | |
17 | handle_HUP (sig) | |
18 | int sig; | |
19 | { | |
20 | } | |
21 | ||
22 | void | |
23 | handle_QUIT (sig) | |
24 | int sig; | |
25 | { | |
26 | } | |
27 | ||
28 | void | |
29 | handle_ILL (sig) | |
30 | int sig; | |
31 | { | |
32 | } | |
33 | ||
34 | void | |
35 | handle_EMT (sig) | |
36 | int sig; | |
37 | { | |
38 | } | |
39 | ||
40 | void | |
41 | handle_FPE (sig) | |
42 | int sig; | |
43 | { | |
44 | } | |
45 | ||
46 | void | |
47 | handle_BUS (sig) | |
48 | int sig; | |
49 | { | |
50 | } | |
51 | ||
52 | void | |
53 | handle_SEGV (sig) | |
54 | int sig; | |
55 | { | |
56 | } | |
57 | ||
58 | void | |
59 | handle_SYS (sig) | |
60 | int sig; | |
61 | { | |
62 | } | |
63 | ||
64 | void | |
65 | handle_PIPE (sig) | |
66 | int sig; | |
67 | { | |
68 | } | |
69 | ||
70 | void | |
71 | handle_ALRM (sig) | |
72 | int sig; | |
73 | { | |
74 | } | |
75 | ||
76 | void | |
77 | handle_URG (sig) | |
78 | int sig; | |
79 | { | |
80 | } | |
81 | ||
82 | void | |
83 | handle_TSTP (sig) | |
84 | int sig; | |
85 | { | |
86 | } | |
87 | ||
88 | void | |
89 | handle_CONT (sig) | |
90 | int sig; | |
91 | { | |
92 | } | |
93 | ||
94 | void | |
95 | handle_CHLD (sig) | |
96 | int sig; | |
97 | { | |
98 | } | |
99 | ||
100 | void | |
101 | handle_TTIN (sig) | |
102 | int sig; | |
103 | { | |
104 | } | |
105 | ||
106 | void | |
107 | handle_TTOU (sig) | |
108 | int sig; | |
109 | { | |
110 | } | |
111 | ||
112 | void | |
113 | handle_IO (sig) | |
114 | int sig; | |
115 | { | |
116 | } | |
117 | ||
118 | void | |
119 | handle_XCPU (sig) | |
120 | int sig; | |
121 | { | |
122 | } | |
123 | ||
124 | void | |
125 | handle_XFSZ (sig) | |
126 | int sig; | |
127 | { | |
128 | } | |
129 | ||
130 | void | |
131 | handle_VTALRM (sig) | |
132 | int sig; | |
133 | { | |
134 | } | |
135 | ||
136 | void | |
137 | handle_PROF (sig) | |
138 | int sig; | |
139 | { | |
140 | } | |
141 | ||
142 | void | |
143 | handle_WINCH (sig) | |
144 | int sig; | |
145 | { | |
146 | } | |
147 | ||
148 | void | |
149 | handle_LOST (sig) | |
150 | int sig; | |
151 | { | |
152 | } | |
153 | ||
154 | void | |
155 | handle_USR1 (sig) | |
156 | int sig; | |
157 | { | |
158 | } | |
159 | ||
160 | void | |
161 | handle_USR2 (sig) | |
162 | int sig; | |
163 | { | |
164 | } | |
165 | ||
166 | void | |
167 | handle_PWR (sig) | |
168 | int sig; | |
169 | { | |
170 | } | |
171 | ||
172 | void | |
173 | handle_POLL (sig) | |
174 | int sig; | |
175 | { | |
176 | } | |
177 | ||
178 | void | |
179 | handle_WIND (sig) | |
180 | int sig; | |
181 | { | |
182 | } | |
183 | ||
184 | void | |
185 | handle_PHONE (sig) | |
186 | int sig; | |
187 | { | |
188 | } | |
189 | ||
190 | void | |
191 | handle_WAITING (sig) | |
192 | int sig; | |
193 | { | |
194 | } | |
195 | ||
196 | void | |
197 | handle_LWP (sig) | |
198 | int sig; | |
199 | { | |
200 | } | |
201 | ||
202 | void | |
203 | handle_DANGER (sig) | |
204 | int sig; | |
205 | { | |
206 | } | |
207 | ||
208 | void | |
209 | handle_GRANT (sig) | |
210 | int sig; | |
211 | { | |
212 | } | |
213 | ||
214 | void | |
215 | handle_RETRACT (sig) | |
216 | int sig; | |
217 | { | |
218 | } | |
219 | ||
220 | void | |
221 | handle_MSG (sig) | |
222 | int sig; | |
223 | { | |
224 | } | |
225 | ||
226 | void | |
227 | handle_SOUND (sig) | |
228 | int sig; | |
229 | { | |
230 | } | |
231 | ||
232 | void | |
233 | handle_SAK (sig) | |
234 | int sig; | |
235 | { | |
236 | } | |
237 | ||
238 | void | |
239 | handle_PRIO (sig) | |
240 | int sig; | |
241 | { | |
242 | } | |
243 | ||
244 | void | |
245 | handle_33 (sig) | |
246 | int sig; | |
247 | { | |
248 | } | |
249 | ||
250 | void | |
251 | handle_34 (sig) | |
252 | int sig; | |
253 | { | |
254 | } | |
255 | ||
256 | void | |
257 | handle_35 (sig) | |
258 | int sig; | |
259 | { | |
260 | } | |
261 | ||
262 | void | |
263 | handle_36 (sig) | |
264 | int sig; | |
265 | { | |
266 | } | |
267 | ||
268 | void | |
269 | handle_37 (sig) | |
270 | int sig; | |
271 | { | |
272 | } | |
273 | ||
274 | void | |
275 | handle_38 (sig) | |
276 | int sig; | |
277 | { | |
278 | } | |
279 | ||
280 | void | |
281 | handle_39 (sig) | |
282 | int sig; | |
283 | { | |
284 | } | |
285 | ||
286 | void | |
287 | handle_40 (sig) | |
288 | int sig; | |
289 | { | |
290 | } | |
291 | ||
292 | void | |
293 | handle_41 (sig) | |
294 | int sig; | |
295 | { | |
296 | } | |
297 | ||
298 | void | |
299 | handle_42 (sig) | |
300 | int sig; | |
301 | { | |
302 | } | |
303 | ||
304 | void | |
305 | handle_43 (sig) | |
306 | int sig; | |
307 | { | |
308 | } | |
309 | ||
310 | void | |
311 | handle_44 (sig) | |
312 | int sig; | |
313 | { | |
314 | } | |
315 | ||
316 | void | |
317 | handle_45 (sig) | |
318 | int sig; | |
319 | { | |
320 | } | |
321 | ||
322 | void | |
323 | handle_46 (sig) | |
324 | int sig; | |
325 | { | |
326 | } | |
327 | ||
328 | void | |
329 | handle_47 (sig) | |
330 | int sig; | |
331 | { | |
332 | } | |
333 | ||
334 | void | |
335 | handle_48 (sig) | |
336 | int sig; | |
337 | { | |
338 | } | |
339 | ||
340 | void | |
341 | handle_49 (sig) | |
342 | int sig; | |
343 | { | |
344 | } | |
345 | ||
346 | void | |
347 | handle_50 (sig) | |
348 | int sig; | |
349 | { | |
350 | } | |
351 | ||
352 | void | |
353 | handle_51 (sig) | |
354 | int sig; | |
355 | { | |
356 | } | |
357 | ||
358 | void | |
359 | handle_52 (sig) | |
360 | int sig; | |
361 | { | |
362 | } | |
363 | ||
364 | void | |
365 | handle_53 (sig) | |
366 | int sig; | |
367 | { | |
368 | } | |
369 | ||
370 | void | |
371 | handle_54 (sig) | |
372 | int sig; | |
373 | { | |
374 | } | |
375 | ||
376 | void | |
377 | handle_55 (sig) | |
378 | int sig; | |
379 | { | |
380 | } | |
381 | ||
382 | void | |
383 | handle_56 (sig) | |
384 | int sig; | |
385 | { | |
386 | } | |
387 | ||
388 | void | |
389 | handle_57 (sig) | |
390 | int sig; | |
391 | { | |
392 | } | |
393 | ||
394 | void | |
395 | handle_58 (sig) | |
396 | int sig; | |
397 | { | |
398 | } | |
399 | ||
400 | void | |
401 | handle_59 (sig) | |
402 | int sig; | |
403 | { | |
404 | } | |
405 | ||
406 | void | |
407 | handle_60 (sig) | |
408 | int sig; | |
409 | { | |
410 | } | |
411 | ||
412 | void | |
413 | handle_61 (sig) | |
414 | int sig; | |
415 | { | |
416 | } | |
417 | ||
418 | void | |
419 | handle_62 (sig) | |
420 | int sig; | |
421 | { | |
422 | } | |
423 | ||
424 | void | |
425 | handle_63 (sig) | |
426 | int sig; | |
427 | { | |
428 | } | |
429 | ||
430 | void | |
431 | handle_TERM (sig) | |
432 | int sig; | |
433 | { | |
434 | } | |
435 | \f | |
436 | /* Functions to send signals. These also serve as markers. */ | |
437 | int | |
438 | gen_ABRT () | |
439 | { | |
440 | kill (getpid (), SIGABRT); | |
441 | } | |
442 | ||
443 | int | |
444 | gen_HUP () | |
445 | { | |
446 | #ifdef SIGHUP | |
447 | kill (getpid (), SIGHUP); | |
448 | #else | |
449 | handle_HUP (0); | |
450 | #endif | |
451 | } | |
452 | ||
453 | int | |
454 | gen_QUIT () | |
455 | { | |
456 | #ifdef SIGQUIT | |
457 | kill (getpid (), SIGQUIT); | |
458 | #else | |
459 | handle_QUIT (0); | |
460 | #endif | |
461 | } | |
462 | ||
463 | int | |
464 | gen_ILL () | |
465 | { | |
466 | #ifdef SIGILL | |
467 | kill (getpid (), SIGILL); | |
468 | #else | |
469 | handle_ILL (0); | |
470 | #endif | |
471 | } | |
472 | ||
473 | int | |
474 | gen_EMT () | |
475 | { | |
476 | #ifdef SIGEMT | |
477 | kill (getpid (), SIGEMT); | |
478 | #else | |
479 | handle_EMT (0); | |
480 | #endif | |
481 | } | |
482 | ||
483 | int x; | |
484 | ||
485 | int | |
486 | gen_FPE () | |
487 | { | |
488 | /* The intent behind generating SIGFPE this way is to check the mapping | |
489 | from the CPU exception itself to the signals. It would be nice to | |
490 | do the same for SIGBUS, SIGSEGV, etc., but I suspect that even this | |
491 | test might turn out to be insufficiently portable. */ | |
492 | ||
493 | #if 0 | |
494 | /* Loses on the PA because after the signal handler executes we try to | |
495 | re-execute the failing instruction again. Perhaps we could siglongjmp | |
496 | out of the signal handler? */ | |
497 | /* The expect script looks for the word "kill"; don't delete it. */ | |
498 | return 5 / x; /* and we both started jumping up and down yelling kill */ | |
499 | #else | |
500 | kill (getpid (), SIGFPE); | |
501 | #endif | |
502 | } | |
503 | ||
504 | int | |
505 | gen_BUS () | |
506 | { | |
507 | #ifdef SIGBUS | |
508 | kill (getpid (), SIGBUS); | |
509 | #else | |
510 | handle_BUS (0); | |
511 | #endif | |
512 | } | |
513 | ||
514 | int | |
515 | gen_SEGV () | |
516 | { | |
517 | #ifdef SIGSEGV | |
518 | kill (getpid (), SIGSEGV); | |
519 | #else | |
520 | handle_SEGV (0); | |
521 | #endif | |
522 | } | |
523 | ||
524 | int | |
525 | gen_SYS () | |
526 | { | |
527 | #ifdef SIGSYS | |
528 | kill (getpid (), SIGSYS); | |
529 | #else | |
530 | handle_SYS (0); | |
531 | #endif | |
532 | } | |
533 | ||
534 | int | |
535 | gen_PIPE () | |
536 | { | |
537 | #ifdef SIGPIPE | |
538 | kill (getpid (), SIGPIPE); | |
539 | #else | |
540 | handle_PIPE (0); | |
541 | #endif | |
542 | } | |
543 | ||
544 | int | |
545 | gen_ALRM () | |
546 | { | |
547 | #ifdef SIGALRM | |
548 | kill (getpid (), SIGALRM); | |
549 | #else | |
550 | handle_ALRM (0); | |
551 | #endif | |
552 | } | |
553 | ||
554 | int | |
555 | gen_URG () | |
556 | { | |
557 | #ifdef SIGURG | |
558 | kill (getpid (), SIGURG); | |
559 | #else | |
560 | handle_URG (0); | |
561 | #endif | |
562 | } | |
563 | ||
564 | int | |
565 | gen_TSTP () | |
566 | { | |
567 | #ifdef SIGTSTP | |
568 | kill (getpid (), SIGTSTP); | |
569 | #else | |
570 | handle_TSTP (0); | |
571 | #endif | |
572 | } | |
573 | ||
574 | int | |
575 | gen_CONT () | |
576 | { | |
577 | #ifdef SIGCONT | |
578 | kill (getpid (), SIGCONT); | |
579 | #else | |
580 | handle_CONT (0); | |
581 | #endif | |
582 | } | |
583 | ||
584 | int | |
585 | gen_CHLD () | |
586 | { | |
587 | #ifdef SIGCHLD | |
588 | kill (getpid (), SIGCHLD); | |
589 | #else | |
590 | handle_CHLD (0); | |
591 | #endif | |
592 | } | |
593 | ||
594 | int | |
595 | gen_TTIN () | |
596 | { | |
597 | #ifdef SIGTTIN | |
598 | kill (getpid (), SIGTTIN); | |
599 | #else | |
600 | handle_TTIN (0); | |
601 | #endif | |
602 | } | |
603 | ||
604 | int | |
605 | gen_TTOU () | |
606 | { | |
607 | #ifdef SIGTTOU | |
608 | kill (getpid (), SIGTTOU); | |
609 | #else | |
610 | handle_TTOU (0); | |
611 | #endif | |
612 | } | |
613 | ||
614 | int | |
615 | gen_IO () | |
616 | { | |
617 | #ifdef SIGIO | |
618 | kill (getpid (), SIGIO); | |
619 | #else | |
620 | handle_IO (0); | |
621 | #endif | |
622 | } | |
623 | ||
624 | int | |
625 | gen_XCPU () | |
626 | { | |
627 | #ifdef SIGXCPU | |
628 | kill (getpid (), SIGXCPU); | |
629 | #else | |
630 | handle_XCPU (0); | |
631 | #endif | |
632 | } | |
633 | ||
634 | int | |
635 | gen_XFSZ () | |
636 | { | |
637 | #ifdef SIGXFSZ | |
638 | kill (getpid (), SIGXFSZ); | |
639 | #else | |
640 | handle_XFSZ (0); | |
641 | #endif | |
642 | } | |
643 | ||
644 | int | |
645 | gen_VTALRM () | |
646 | { | |
647 | #ifdef SIGVTALRM | |
648 | kill (getpid (), SIGVTALRM); | |
649 | #else | |
650 | handle_VTALRM (0); | |
651 | #endif | |
652 | } | |
653 | ||
654 | int | |
655 | gen_PROF () | |
656 | { | |
657 | #ifdef SIGPROF | |
658 | kill (getpid (), SIGPROF); | |
659 | #else | |
660 | handle_PROF (0); | |
661 | #endif | |
662 | } | |
663 | ||
664 | int | |
665 | gen_WINCH () | |
666 | { | |
667 | #ifdef SIGWINCH | |
668 | kill (getpid (), SIGWINCH); | |
669 | #else | |
670 | handle_WINCH (0); | |
671 | #endif | |
672 | } | |
673 | ||
674 | int | |
675 | gen_LOST () | |
676 | { | |
677 | #if defined(SIGLOST) && (!defined(SIGABRT) || SIGLOST != SIGABRT) | |
678 | kill (getpid (), SIGLOST); | |
679 | #else | |
680 | handle_LOST (0); | |
681 | #endif | |
682 | } | |
683 | ||
684 | int | |
685 | gen_USR1 () | |
686 | { | |
687 | #ifdef SIGUSR1 | |
688 | kill (getpid (), SIGUSR1); | |
689 | #else | |
690 | handle_USR1 (0); | |
691 | #endif | |
692 | } | |
693 | ||
694 | int | |
695 | gen_USR2 () | |
696 | { | |
697 | #ifdef SIGUSR2 | |
698 | kill (getpid (), SIGUSR2); | |
699 | #else | |
700 | handle_USR2 (0); | |
701 | #endif | |
702 | } | |
703 | ||
704 | int | |
705 | gen_PWR () | |
706 | { | |
707 | #ifdef SIGPWR | |
708 | kill (getpid (), SIGPWR); | |
709 | #else | |
710 | handle_PWR (0); | |
711 | #endif | |
712 | } | |
713 | ||
714 | int | |
715 | gen_POLL () | |
716 | { | |
717 | #if defined (SIGPOLL) && (!defined (SIGIO) || SIGPOLL != SIGIO) | |
718 | kill (getpid (), SIGPOLL); | |
719 | #else | |
720 | handle_POLL (0); | |
721 | #endif | |
722 | } | |
723 | ||
724 | int | |
725 | gen_WIND () | |
726 | { | |
727 | #ifdef SIGWIND | |
728 | kill (getpid (), SIGWIND); | |
729 | #else | |
730 | handle_WIND (0); | |
731 | #endif | |
732 | } | |
733 | ||
734 | int | |
735 | gen_PHONE () | |
736 | { | |
737 | #ifdef SIGPHONE | |
738 | kill (getpid (), SIGPHONE); | |
739 | #else | |
740 | handle_PHONE (0); | |
741 | #endif | |
742 | } | |
743 | ||
744 | int | |
745 | gen_WAITING () | |
746 | { | |
747 | #ifdef SIGWAITING | |
748 | kill (getpid (), SIGWAITING); | |
749 | #else | |
750 | handle_WAITING (0); | |
751 | #endif | |
752 | } | |
753 | ||
754 | int | |
755 | gen_LWP () | |
756 | { | |
757 | #ifdef SIGLWP | |
758 | kill (getpid (), SIGLWP); | |
759 | #else | |
760 | handle_LWP (0); | |
761 | #endif | |
762 | } | |
763 | ||
764 | int | |
765 | gen_DANGER () | |
766 | { | |
767 | #ifdef SIGDANGER | |
768 | kill (getpid (), SIGDANGER); | |
769 | #else | |
770 | handle_DANGER (0); | |
771 | #endif | |
772 | } | |
773 | ||
774 | int | |
775 | gen_GRANT () | |
776 | { | |
777 | #ifdef SIGGRANT | |
778 | kill (getpid (), SIGGRANT); | |
779 | #else | |
780 | handle_GRANT (0); | |
781 | #endif | |
782 | } | |
783 | ||
784 | int | |
785 | gen_RETRACT () | |
786 | { | |
787 | #ifdef SIGRETRACT | |
788 | kill (getpid (), SIGRETRACT); | |
789 | #else | |
790 | handle_RETRACT (0); | |
791 | #endif | |
792 | } | |
793 | ||
794 | int | |
795 | gen_MSG () | |
796 | { | |
797 | #ifdef SIGMSG | |
798 | kill (getpid (), SIGMSG); | |
799 | #else | |
800 | handle_MSG (0); | |
801 | #endif | |
802 | } | |
803 | ||
804 | int | |
805 | gen_SOUND () | |
806 | { | |
807 | #ifdef SIGSOUND | |
808 | kill (getpid (), SIGSOUND); | |
809 | #else | |
810 | handle_SOUND (0); | |
811 | #endif | |
812 | } | |
813 | ||
814 | int | |
815 | gen_SAK () | |
816 | { | |
817 | #ifdef SIGSAK | |
818 | kill (getpid (), SIGSAK); | |
819 | #else | |
820 | handle_SAK (0); | |
821 | #endif | |
822 | } | |
823 | ||
824 | int | |
825 | gen_PRIO () | |
826 | { | |
827 | #ifdef SIGPRIO | |
828 | kill (getpid (), SIGPRIO); | |
829 | #else | |
830 | handle_PRIO (0); | |
831 | #endif | |
832 | } | |
833 | ||
834 | int | |
835 | gen_33 () | |
836 | { | |
837 | #ifdef SIG33 | |
838 | kill (getpid (), 33); | |
839 | #else | |
840 | handle_33 (0); | |
841 | #endif | |
842 | } | |
843 | ||
844 | int | |
845 | gen_34 () | |
846 | { | |
847 | #ifdef SIG34 | |
848 | kill (getpid (), 34); | |
849 | #else | |
850 | handle_34 (0); | |
851 | #endif | |
852 | } | |
853 | ||
854 | int | |
855 | gen_35 () | |
856 | { | |
857 | #ifdef SIG35 | |
858 | kill (getpid (), 35); | |
859 | #else | |
860 | handle_35 (0); | |
861 | #endif | |
862 | } | |
863 | ||
864 | int | |
865 | gen_36 () | |
866 | { | |
867 | #ifdef SIG36 | |
868 | kill (getpid (), 36); | |
869 | #else | |
870 | handle_36 (0); | |
871 | #endif | |
872 | } | |
873 | ||
874 | int | |
875 | gen_37 () | |
876 | { | |
877 | #ifdef SIG37 | |
878 | kill (getpid (), 37); | |
879 | #else | |
880 | handle_37 (0); | |
881 | #endif | |
882 | } | |
883 | ||
884 | int | |
885 | gen_38 () | |
886 | { | |
887 | #ifdef SIG38 | |
888 | kill (getpid (), 38); | |
889 | #else | |
890 | handle_38 (0); | |
891 | #endif | |
892 | } | |
893 | ||
894 | int | |
895 | gen_39 () | |
896 | { | |
897 | #ifdef SIG39 | |
898 | kill (getpid (), 39); | |
899 | #else | |
900 | handle_39 (0); | |
901 | #endif | |
902 | } | |
903 | ||
904 | int | |
905 | gen_40 () | |
906 | { | |
907 | #ifdef SIG40 | |
908 | kill (getpid (), 40); | |
909 | #else | |
910 | handle_40 (0); | |
911 | #endif | |
912 | } | |
913 | ||
914 | int | |
915 | gen_41 () | |
916 | { | |
917 | #ifdef SIG41 | |
918 | kill (getpid (), 41); | |
919 | #else | |
920 | handle_41 (0); | |
921 | #endif | |
922 | } | |
923 | ||
924 | int | |
925 | gen_42 () | |
926 | { | |
927 | #ifdef SIG42 | |
928 | kill (getpid (), 42); | |
929 | #else | |
930 | handle_42 (0); | |
931 | #endif | |
932 | } | |
933 | ||
934 | int | |
935 | gen_43 () | |
936 | { | |
937 | #ifdef SIG43 | |
938 | kill (getpid (), 43); | |
939 | #else | |
940 | handle_43 (0); | |
941 | #endif | |
942 | } | |
943 | ||
944 | int | |
945 | gen_44 () | |
946 | { | |
947 | #ifdef SIG44 | |
948 | kill (getpid (), 44); | |
949 | #else | |
950 | handle_44 (0); | |
951 | #endif | |
952 | } | |
953 | ||
954 | int | |
955 | gen_45 () | |
956 | { | |
957 | #ifdef SIG45 | |
958 | kill (getpid (), 45); | |
959 | #else | |
960 | handle_45 (0); | |
961 | #endif | |
962 | } | |
963 | ||
964 | int | |
965 | gen_46 () | |
966 | { | |
967 | #ifdef SIG46 | |
968 | kill (getpid (), 46); | |
969 | #else | |
970 | handle_46 (0); | |
971 | #endif | |
972 | } | |
973 | ||
974 | int | |
975 | gen_47 () | |
976 | { | |
977 | #ifdef SIG47 | |
978 | kill (getpid (), 47); | |
979 | #else | |
980 | handle_47 (0); | |
981 | #endif | |
982 | } | |
983 | ||
984 | int | |
985 | gen_48 () | |
986 | { | |
987 | #ifdef SIG48 | |
988 | kill (getpid (), 48); | |
989 | #else | |
990 | handle_48 (0); | |
991 | #endif | |
992 | } | |
993 | ||
994 | int | |
995 | gen_49 () | |
996 | { | |
997 | #ifdef SIG49 | |
998 | kill (getpid (), 49); | |
999 | #else | |
1000 | handle_49 (0); | |
1001 | #endif | |
1002 | } | |
1003 | ||
1004 | int | |
1005 | gen_50 () | |
1006 | { | |
1007 | #ifdef SIG50 | |
1008 | kill (getpid (), 50); | |
1009 | #else | |
1010 | handle_50 (0); | |
1011 | #endif | |
1012 | } | |
1013 | ||
1014 | int | |
1015 | gen_51 () | |
1016 | { | |
1017 | #ifdef SIG51 | |
1018 | kill (getpid (), 51); | |
1019 | #else | |
1020 | handle_51 (0); | |
1021 | #endif | |
1022 | } | |
1023 | ||
1024 | int | |
1025 | gen_52 () | |
1026 | { | |
1027 | #ifdef SIG52 | |
1028 | kill (getpid (), 52); | |
1029 | #else | |
1030 | handle_52 (0); | |
1031 | #endif | |
1032 | } | |
1033 | ||
1034 | int | |
1035 | gen_53 () | |
1036 | { | |
1037 | #ifdef SIG53 | |
1038 | kill (getpid (), 53); | |
1039 | #else | |
1040 | handle_53 (0); | |
1041 | #endif | |
1042 | } | |
1043 | ||
1044 | int | |
1045 | gen_54 () | |
1046 | { | |
1047 | #ifdef SIG54 | |
1048 | kill (getpid (), 54); | |
1049 | #else | |
1050 | handle_54 (0); | |
1051 | #endif | |
1052 | } | |
1053 | ||
1054 | int | |
1055 | gen_55 () | |
1056 | { | |
1057 | #ifdef SIG55 | |
1058 | kill (getpid (), 55); | |
1059 | #else | |
1060 | handle_55 (0); | |
1061 | #endif | |
1062 | } | |
1063 | ||
1064 | int | |
1065 | gen_56 () | |
1066 | { | |
1067 | #ifdef SIG56 | |
1068 | kill (getpid (), 56); | |
1069 | #else | |
1070 | handle_56 (0); | |
1071 | #endif | |
1072 | } | |
1073 | ||
1074 | int | |
1075 | gen_57 () | |
1076 | { | |
1077 | #ifdef SIG57 | |
1078 | kill (getpid (), 57); | |
1079 | #else | |
1080 | handle_57 (0); | |
1081 | #endif | |
1082 | } | |
1083 | ||
1084 | int | |
1085 | gen_58 () | |
1086 | { | |
1087 | #ifdef SIG58 | |
1088 | kill (getpid (), 58); | |
1089 | #else | |
1090 | handle_58 (0); | |
1091 | #endif | |
1092 | } | |
1093 | ||
1094 | int | |
1095 | gen_59 () | |
1096 | { | |
1097 | #ifdef SIG59 | |
1098 | kill (getpid (), 59); | |
1099 | #else | |
1100 | handle_59 (0); | |
1101 | #endif | |
1102 | } | |
1103 | ||
1104 | int | |
1105 | gen_60 () | |
1106 | { | |
1107 | #ifdef SIG60 | |
1108 | kill (getpid (), 60); | |
1109 | #else | |
1110 | handle_60 (0); | |
1111 | #endif | |
1112 | } | |
1113 | ||
1114 | int | |
1115 | gen_61 () | |
1116 | { | |
1117 | #ifdef SIG61 | |
1118 | kill (getpid (), 61); | |
1119 | #else | |
1120 | handle_61 (0); | |
1121 | #endif | |
1122 | } | |
1123 | ||
1124 | int | |
1125 | gen_62 () | |
1126 | { | |
1127 | #ifdef SIG62 | |
1128 | kill (getpid (), 62); | |
1129 | #else | |
1130 | handle_62 (0); | |
1131 | #endif | |
1132 | } | |
1133 | ||
1134 | int | |
1135 | gen_63 () | |
1136 | { | |
1137 | #ifdef SIG63 | |
1138 | kill (getpid (), 63); | |
1139 | #else | |
1140 | handle_63 (0); | |
1141 | #endif | |
1142 | } | |
1143 | ||
1144 | int | |
1145 | gen_TERM () | |
1146 | { | |
1147 | kill (getpid (), SIGTERM); | |
1148 | } | |
1149 | \f | |
1150 | int | |
1151 | main () | |
1152 | { | |
1153 | #ifdef usestubs | |
1154 | set_debug_traps (); | |
1155 | breakpoint (); | |
1156 | #endif | |
1157 | signal (SIGABRT, handle_ABRT); | |
1158 | #ifdef SIGHUP | |
1159 | signal (SIGHUP, handle_HUP); | |
1160 | #endif | |
1161 | #ifdef SIGQUIT | |
1162 | signal (SIGQUIT, handle_QUIT); | |
1163 | #endif | |
1164 | #ifdef SIGILL | |
1165 | signal (SIGILL, handle_ILL); | |
1166 | #endif | |
1167 | #ifdef SIGEMT | |
1168 | signal (SIGEMT, handle_EMT); | |
1169 | #endif | |
1170 | #ifdef SIGFPE | |
1171 | signal (SIGFPE, handle_FPE); | |
1172 | #endif | |
1173 | #ifdef SIGBUS | |
1174 | signal (SIGBUS, handle_BUS); | |
1175 | #endif | |
1176 | #ifdef SIGSEGV | |
1177 | signal (SIGSEGV, handle_SEGV); | |
1178 | #endif | |
1179 | #ifdef SIGSYS | |
1180 | signal (SIGSYS, handle_SYS); | |
1181 | #endif | |
1182 | #ifdef SIGPIPE | |
1183 | signal (SIGPIPE, handle_PIPE); | |
1184 | #endif | |
1185 | #ifdef SIGALRM | |
1186 | signal (SIGALRM, handle_ALRM); | |
1187 | #endif | |
1188 | #ifdef SIGURG | |
1189 | signal (SIGURG, handle_URG); | |
1190 | #endif | |
1191 | #ifdef SIGTSTP | |
1192 | signal (SIGTSTP, handle_TSTP); | |
1193 | #endif | |
1194 | #ifdef SIGCONT | |
1195 | signal (SIGCONT, handle_CONT); | |
1196 | #endif | |
1197 | #ifdef SIGCHLD | |
1198 | signal (SIGCHLD, handle_CHLD); | |
1199 | #endif | |
1200 | #ifdef SIGTTIN | |
1201 | signal (SIGTTIN, handle_TTIN); | |
1202 | #endif | |
1203 | #ifdef SIGTTOU | |
1204 | signal (SIGTTOU, handle_TTOU); | |
1205 | #endif | |
1206 | #ifdef SIGIO | |
1207 | signal (SIGIO, handle_IO); | |
1208 | #endif | |
1209 | #ifdef SIGXCPU | |
1210 | signal (SIGXCPU, handle_XCPU); | |
1211 | #endif | |
1212 | #ifdef SIGXFSZ | |
1213 | signal (SIGXFSZ, handle_XFSZ); | |
1214 | #endif | |
1215 | #ifdef SIGVTALRM | |
1216 | signal (SIGVTALRM, handle_VTALRM); | |
1217 | #endif | |
1218 | #ifdef SIGPROF | |
1219 | signal (SIGPROF, handle_PROF); | |
1220 | #endif | |
1221 | #ifdef SIGWINCH | |
1222 | signal (SIGWINCH, handle_WINCH); | |
1223 | #endif | |
1224 | #if defined(SIGLOST) && (!defined(SIGABRT) || SIGLOST != SIGABRT) | |
1225 | signal (SIGLOST, handle_LOST); | |
1226 | #endif | |
1227 | #ifdef SIGUSR1 | |
1228 | signal (SIGUSR1, handle_USR1); | |
1229 | #endif | |
1230 | #ifdef SIGUSR2 | |
1231 | signal (SIGUSR2, handle_USR2); | |
1232 | #endif | |
1233 | #ifdef SIGPWR | |
1234 | signal (SIGPWR, handle_PWR); | |
1235 | #endif | |
1236 | #if defined (SIGPOLL) && (!defined (SIGIO) || SIGPOLL != SIGIO) | |
1237 | signal (SIGPOLL, handle_POLL); | |
1238 | #endif | |
1239 | #ifdef SIGWIND | |
1240 | signal (SIGWIND, handle_WIND); | |
1241 | #endif | |
1242 | #ifdef SIGPHONE | |
1243 | signal (SIGPHONE, handle_PHONE); | |
1244 | #endif | |
1245 | #ifdef SIGWAITING | |
1246 | signal (SIGWAITING, handle_WAITING); | |
1247 | #endif | |
1248 | #ifdef SIGLWP | |
1249 | signal (SIGLWP, handle_LWP); | |
1250 | #endif | |
1251 | #ifdef SIGDANGER | |
1252 | signal (SIGDANGER, handle_DANGER); | |
1253 | #endif | |
1254 | #ifdef SIGGRANT | |
1255 | signal (SIGGRANT, handle_GRANT); | |
1256 | #endif | |
1257 | #ifdef SIGRETRACT | |
1258 | signal (SIGRETRACT, handle_RETRACT); | |
1259 | #endif | |
1260 | #ifdef SIGMSG | |
1261 | signal (SIGMSG, handle_MSG); | |
1262 | #endif | |
1263 | #ifdef SIGSOUND | |
1264 | signal (SIGSOUND, handle_SOUND); | |
1265 | #endif | |
1266 | #ifdef SIGSAK | |
1267 | signal (SIGSAK, handle_SAK); | |
1268 | #endif | |
1269 | #ifdef SIGPRIO | |
1270 | signal (SIGPRIO, handle_PRIO); | |
1271 | #endif | |
1272 | #ifdef __Lynx__ | |
1273 | /* Lynx doesn't seem to have anything in signal.h for this. */ | |
1274 | signal (33, handle_33); | |
1275 | signal (34, handle_34); | |
1276 | signal (35, handle_35); | |
1277 | signal (36, handle_36); | |
1278 | signal (37, handle_37); | |
1279 | signal (38, handle_38); | |
1280 | signal (39, handle_39); | |
1281 | signal (40, handle_40); | |
1282 | signal (41, handle_41); | |
1283 | signal (42, handle_42); | |
1284 | signal (43, handle_43); | |
1285 | signal (44, handle_44); | |
1286 | signal (45, handle_45); | |
1287 | signal (46, handle_46); | |
1288 | signal (47, handle_47); | |
1289 | signal (48, handle_48); | |
1290 | signal (49, handle_49); | |
1291 | signal (50, handle_50); | |
1292 | signal (51, handle_51); | |
1293 | signal (52, handle_52); | |
1294 | signal (53, handle_53); | |
1295 | signal (54, handle_54); | |
1296 | signal (55, handle_55); | |
1297 | signal (56, handle_56); | |
1298 | signal (57, handle_57); | |
1299 | signal (58, handle_58); | |
1300 | signal (59, handle_59); | |
1301 | signal (60, handle_60); | |
1302 | signal (61, handle_61); | |
1303 | signal (62, handle_62); | |
1304 | signal (63, handle_63); | |
1305 | #endif /* lynx */ | |
1306 | signal (SIGTERM, handle_TERM); | |
1307 | ||
1308 | x = 0; | |
1309 | ||
1310 | gen_ABRT (); | |
1311 | gen_HUP (); | |
1312 | gen_QUIT (); | |
1313 | gen_ILL (); | |
1314 | gen_EMT (); | |
1315 | gen_FPE (); | |
1316 | gen_BUS (); | |
1317 | gen_SEGV (); | |
1318 | gen_SYS (); | |
1319 | gen_PIPE (); | |
1320 | gen_ALRM (); | |
1321 | gen_URG (); | |
1322 | gen_TSTP (); | |
1323 | gen_CONT (); | |
1324 | gen_CHLD (); | |
1325 | gen_TTIN (); | |
1326 | gen_TTOU (); | |
1327 | gen_IO (); | |
1328 | gen_XCPU (); | |
1329 | gen_XFSZ (); | |
1330 | gen_VTALRM (); | |
1331 | gen_PROF (); | |
1332 | gen_WINCH (); | |
1333 | gen_LOST (); | |
1334 | gen_USR1 (); | |
1335 | gen_USR2 (); | |
1336 | gen_PWR (); | |
1337 | gen_POLL (); | |
1338 | gen_WIND (); | |
1339 | gen_PHONE (); | |
1340 | gen_WAITING (); | |
1341 | gen_LWP (); | |
1342 | gen_DANGER (); | |
1343 | gen_GRANT (); | |
1344 | gen_RETRACT (); | |
1345 | gen_MSG (); | |
1346 | gen_SOUND (); | |
1347 | gen_SAK (); | |
1348 | gen_PRIO (); | |
1349 | gen_33 (); | |
1350 | gen_34 (); | |
1351 | gen_35 (); | |
1352 | gen_36 (); | |
1353 | gen_37 (); | |
1354 | gen_38 (); | |
1355 | gen_39 (); | |
1356 | gen_40 (); | |
1357 | gen_41 (); | |
1358 | gen_42 (); | |
1359 | gen_43 (); | |
1360 | gen_44 (); | |
1361 | gen_45 (); | |
1362 | gen_46 (); | |
1363 | gen_47 (); | |
1364 | gen_48 (); | |
1365 | gen_49 (); | |
1366 | gen_50 (); | |
1367 | gen_51 (); | |
1368 | gen_52 (); | |
1369 | gen_53 (); | |
1370 | gen_54 (); | |
1371 | gen_55 (); | |
1372 | gen_56 (); | |
1373 | gen_57 (); | |
1374 | gen_58 (); | |
1375 | gen_59 (); | |
1376 | gen_60 (); | |
1377 | gen_61 (); | |
1378 | gen_62 (); | |
1379 | gen_63 (); | |
1380 | gen_TERM (); | |
1381 | ||
1382 | return 0; | |
1383 | } |