Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gdb6 / gdb / testsuite / gdb.base / sigall.c
blob30d06f367d309f39fdc7db813df04cff02b57e7c
1 #include <signal.h>
2 #include <unistd.h>
4 #ifdef __sh__
5 #define signal(a,b) /* Signals not supported on this target - make them go away */
6 #endif
8 /* Signal handlers, we set breakpoints in them to make sure that the
9 signals really get delivered. */
11 #ifdef PROTOTYPES
12 void
13 handle_ABRT (int sig)
14 #else
15 void
16 handle_ABRT (sig)
17 int sig;
18 #endif
22 #ifdef PROTOTYPES
23 void
24 handle_HUP (int sig)
25 #else
26 void
27 handle_HUP (sig)
28 int sig;
29 #endif
33 #ifdef PROTOTYPES
34 void
35 handle_QUIT (int sig)
36 #else
37 void
38 handle_QUIT (sig)
39 int sig;
40 #endif
44 #ifdef PROTOTYPES
45 void
46 handle_ILL (int sig)
47 #else
48 void
49 handle_ILL (sig)
50 int sig;
51 #endif
55 #ifdef PROTOTYPES
56 void
57 handle_EMT (int sig)
58 #else
59 void
60 handle_EMT (sig)
61 int sig;
62 #endif
66 #ifdef PROTOTYPES
67 void
68 handle_FPE (int sig)
69 #else
70 void
71 handle_FPE (sig)
72 int sig;
73 #endif
77 #ifdef PROTOTYPES
78 void
79 handle_BUS (int sig)
80 #else
81 void
82 handle_BUS (sig)
83 int sig;
84 #endif
88 #ifdef PROTOTYPES
89 void
90 handle_SEGV (int sig)
91 #else
92 void
93 handle_SEGV (sig)
94 int sig;
95 #endif
99 #ifdef PROTOTYPES
100 void
101 handle_SYS (int sig)
102 #else
103 void
104 handle_SYS (sig)
105 int sig;
106 #endif
110 #ifdef PROTOTYPES
111 void
112 handle_PIPE (int sig)
113 #else
114 void
115 handle_PIPE (sig)
116 int sig;
117 #endif
121 #ifdef PROTOTYPES
122 void
123 handle_ALRM (int sig)
124 #else
125 void
126 handle_ALRM (sig)
127 int sig;
128 #endif
132 #ifdef PROTOTYPES
133 void
134 handle_URG (int sig)
135 #else
136 void
137 handle_URG (sig)
138 int sig;
139 #endif
143 #ifdef PROTOTYPES
144 void
145 handle_TSTP (int sig)
146 #else
147 void
148 handle_TSTP (sig)
149 int sig;
150 #endif
154 #ifdef PROTOTYPES
155 void
156 handle_CONT (int sig)
157 #else
158 void
159 handle_CONT (sig)
160 int sig;
161 #endif
165 #ifdef PROTOTYPES
166 void
167 handle_CHLD (int sig)
168 #else
169 void
170 handle_CHLD (sig)
171 int sig;
172 #endif
176 #ifdef PROTOTYPES
177 void
178 handle_TTIN (int sig)
179 #else
180 void
181 handle_TTIN (sig)
182 int sig;
183 #endif
187 #ifdef PROTOTYPES
188 void
189 handle_TTOU (int sig)
190 #else
191 void
192 handle_TTOU (sig)
193 int sig;
194 #endif
198 #ifdef PROTOTYPES
199 void
200 handle_IO (int sig)
201 #else
202 void
203 handle_IO (sig)
204 int sig;
205 #endif
209 #ifdef PROTOTYPES
210 void
211 handle_XCPU (int sig)
212 #else
213 void
214 handle_XCPU (sig)
215 int sig;
216 #endif
220 #ifdef PROTOTYPES
221 void
222 handle_XFSZ (int sig)
223 #else
224 void
225 handle_XFSZ (sig)
226 int sig;
227 #endif
231 #ifdef PROTOTYPES
232 void
233 handle_VTALRM (int sig)
234 #else
235 void
236 handle_VTALRM (sig)
237 int sig;
238 #endif
242 #ifdef PROTOTYPES
243 void
244 handle_PROF (int sig)
245 #else
246 void
247 handle_PROF (sig)
248 int sig;
249 #endif
253 #ifdef PROTOTYPES
254 void
255 handle_WINCH (int sig)
256 #else
257 void
258 handle_WINCH (sig)
259 int sig;
260 #endif
264 #ifdef PROTOTYPES
265 void
266 handle_LOST (int sig)
267 #else
268 void
269 handle_LOST (sig)
270 int sig;
271 #endif
275 #ifdef PROTOTYPES
276 void
277 handle_USR1 (int sig)
278 #else
279 void
280 handle_USR1 (sig)
281 int sig;
282 #endif
286 #ifdef PROTOTYPES
287 void
288 handle_USR2 (int sig)
289 #else
290 void
291 handle_USR2 (sig)
292 int sig;
293 #endif
297 #ifdef PROTOTYPES
298 void
299 handle_PWR (int sig)
300 #else
301 void
302 handle_PWR (sig)
303 int sig;
304 #endif
308 #ifdef PROTOTYPES
309 void
310 handle_POLL (int sig)
311 #else
312 void
313 handle_POLL (sig)
314 int sig;
315 #endif
319 #ifdef PROTOTYPES
320 void
321 handle_WIND (int sig)
322 #else
323 void
324 handle_WIND (sig)
325 int sig;
326 #endif
330 #ifdef PROTOTYPES
331 void
332 handle_PHONE (int sig)
333 #else
334 void
335 handle_PHONE (sig)
336 int sig;
337 #endif
341 #ifdef PROTOTYPES
342 void
343 handle_WAITING (int sig)
344 #else
345 void
346 handle_WAITING (sig)
347 int sig;
348 #endif
352 #ifdef PROTOTYPES
353 void
354 handle_LWP (int sig)
355 #else
356 void
357 handle_LWP (sig)
358 int sig;
359 #endif
363 #ifdef PROTOTYPES
364 void
365 handle_DANGER (int sig)
366 #else
367 void
368 handle_DANGER (sig)
369 int sig;
370 #endif
374 #ifdef PROTOTYPES
375 void
376 handle_GRANT (int sig)
377 #else
378 void
379 handle_GRANT (sig)
380 int sig;
381 #endif
385 #ifdef PROTOTYPES
386 void
387 handle_RETRACT (int sig)
388 #else
389 void
390 handle_RETRACT (sig)
391 int sig;
392 #endif
396 #ifdef PROTOTYPES
397 void
398 handle_MSG (int sig)
399 #else
400 void
401 handle_MSG (sig)
402 int sig;
403 #endif
407 #ifdef PROTOTYPES
408 void
409 handle_SOUND (int sig)
410 #else
411 void
412 handle_SOUND (sig)
413 int sig;
414 #endif
418 #ifdef PROTOTYPES
419 void
420 handle_SAK (int sig)
421 #else
422 void
423 handle_SAK (sig)
424 int sig;
425 #endif
429 #ifdef PROTOTYPES
430 void
431 handle_PRIO (int sig)
432 #else
433 void
434 handle_PRIO (sig)
435 int sig;
436 #endif
440 #ifdef PROTOTYPES
441 void
442 handle_33 (int sig)
443 #else
444 void
445 handle_33 (sig)
446 int sig;
447 #endif
451 #ifdef PROTOTYPES
452 void
453 handle_34 (int sig)
454 #else
455 void
456 handle_34 (sig)
457 int sig;
458 #endif
462 #ifdef PROTOTYPES
463 void
464 handle_35 (int sig)
465 #else
466 void
467 handle_35 (sig)
468 int sig;
469 #endif
473 #ifdef PROTOTYPES
474 void
475 handle_36 (int sig)
476 #else
477 void
478 handle_36 (sig)
479 int sig;
480 #endif
484 #ifdef PROTOTYPES
485 void
486 handle_37 (int sig)
487 #else
488 void
489 handle_37 (sig)
490 int sig;
491 #endif
495 #ifdef PROTOTYPES
496 void
497 handle_38 (int sig)
498 #else
499 void
500 handle_38 (sig)
501 int sig;
502 #endif
506 #ifdef PROTOTYPES
507 void
508 handle_39 (int sig)
509 #else
510 void
511 handle_39 (sig)
512 int sig;
513 #endif
517 #ifdef PROTOTYPES
518 void
519 handle_40 (int sig)
520 #else
521 void
522 handle_40 (sig)
523 int sig;
524 #endif
528 #ifdef PROTOTYPES
529 void
530 handle_41 (int sig)
531 #else
532 void
533 handle_41 (sig)
534 int sig;
535 #endif
539 #ifdef PROTOTYPES
540 void
541 handle_42 (int sig)
542 #else
543 void
544 handle_42 (sig)
545 int sig;
546 #endif
550 #ifdef PROTOTYPES
551 void
552 handle_43 (int sig)
553 #else
554 void
555 handle_43 (sig)
556 int sig;
557 #endif
561 #ifdef PROTOTYPES
562 void
563 handle_44 (int sig)
564 #else
565 void
566 handle_44 (sig)
567 int sig;
568 #endif
572 #ifdef PROTOTYPES
573 void
574 handle_45 (int sig)
575 #else
576 void
577 handle_45 (sig)
578 int sig;
579 #endif
583 #ifdef PROTOTYPES
584 void
585 handle_46 (int sig)
586 #else
587 void
588 handle_46 (sig)
589 int sig;
590 #endif
594 #ifdef PROTOTYPES
595 void
596 handle_47 (int sig)
597 #else
598 void
599 handle_47 (sig)
600 int sig;
601 #endif
605 #ifdef PROTOTYPES
606 void
607 handle_48 (int sig)
608 #else
609 void
610 handle_48 (sig)
611 int sig;
612 #endif
616 #ifdef PROTOTYPES
617 void
618 handle_49 (int sig)
619 #else
620 void
621 handle_49 (sig)
622 int sig;
623 #endif
627 #ifdef PROTOTYPES
628 void
629 handle_50 (int sig)
630 #else
631 void
632 handle_50 (sig)
633 int sig;
634 #endif
638 #ifdef PROTOTYPES
639 void
640 handle_51 (int sig)
641 #else
642 void
643 handle_51 (sig)
644 int sig;
645 #endif
649 #ifdef PROTOTYPES
650 void
651 handle_52 (int sig)
652 #else
653 void
654 handle_52 (sig)
655 int sig;
656 #endif
660 #ifdef PROTOTYPES
661 void
662 handle_53 (int sig)
663 #else
664 void
665 handle_53 (sig)
666 int sig;
667 #endif
671 #ifdef PROTOTYPES
672 void
673 handle_54 (int sig)
674 #else
675 void
676 handle_54 (sig)
677 int sig;
678 #endif
682 #ifdef PROTOTYPES
683 void
684 handle_55 (int sig)
685 #else
686 void
687 handle_55 (sig)
688 int sig;
689 #endif
693 #ifdef PROTOTYPES
694 void
695 handle_56 (int sig)
696 #else
697 void
698 handle_56 (sig)
699 int sig;
700 #endif
704 #ifdef PROTOTYPES
705 void
706 handle_57 (int sig)
707 #else
708 void
709 handle_57 (sig)
710 int sig;
711 #endif
715 #ifdef PROTOTYPES
716 void
717 handle_58 (int sig)
718 #else
719 void
720 handle_58 (sig)
721 int sig;
722 #endif
726 #ifdef PROTOTYPES
727 void
728 handle_59 (int sig)
729 #else
730 void
731 handle_59 (sig)
732 int sig;
733 #endif
737 #ifdef PROTOTYPES
738 void
739 handle_60 (int sig)
740 #else
741 void
742 handle_60 (sig)
743 int sig;
744 #endif
748 #ifdef PROTOTYPES
749 void
750 handle_61 (int sig)
751 #else
752 void
753 handle_61 (sig)
754 int sig;
755 #endif
759 #ifdef PROTOTYPES
760 void
761 handle_62 (int sig)
762 #else
763 void
764 handle_62 (sig)
765 int sig;
766 #endif
770 #ifdef PROTOTYPES
771 void
772 handle_63 (int sig)
773 #else
774 void
775 handle_63 (sig)
776 int sig;
777 #endif
781 #ifdef PROTOTYPES
782 void
783 handle_TERM (int sig)
784 #else
785 void
786 handle_TERM (sig)
787 int sig;
788 #endif
792 /* Functions to send signals. These also serve as markers. */
794 gen_ABRT ()
796 kill (getpid (), SIGABRT);
797 return 0;
801 gen_HUP ()
803 #ifdef SIGHUP
804 kill (getpid (), SIGHUP);
805 #else
806 handle_HUP (0);
807 #endif
808 return 0;
812 gen_QUIT ()
814 #ifdef SIGQUIT
815 kill (getpid (), SIGQUIT);
816 #else
817 handle_QUIT (0);
818 #endif
819 return 0;
823 gen_ILL ()
825 #ifdef SIGILL
826 kill (getpid (), SIGILL);
827 #else
828 handle_ILL (0);
829 #endif
830 return 0;
834 gen_EMT ()
836 #ifdef SIGEMT
837 kill (getpid (), SIGEMT);
838 #else
839 handle_EMT (0);
840 #endif
841 return 0;
844 int x;
847 gen_FPE ()
849 /* The intent behind generating SIGFPE this way is to check the mapping
850 from the CPU exception itself to the signals. It would be nice to
851 do the same for SIGBUS, SIGSEGV, etc., but I suspect that even this
852 test might turn out to be insufficiently portable. */
854 #if 0
855 /* Loses on the PA because after the signal handler executes we try to
856 re-execute the failing instruction again. Perhaps we could siglongjmp
857 out of the signal handler? */
858 /* The expect script looks for the word "kill"; don't delete it. */
859 return 5 / x; /* and we both started jumping up and down yelling kill */
860 #else
861 kill (getpid (), SIGFPE);
862 #endif
863 return 0;
867 gen_BUS ()
869 #ifdef SIGBUS
870 kill (getpid (), SIGBUS);
871 #else
872 handle_BUS (0);
873 #endif
874 return 0;
878 gen_SEGV ()
880 #ifdef SIGSEGV
881 kill (getpid (), SIGSEGV);
882 #else
883 handle_SEGV (0);
884 #endif
885 return 0;
889 gen_SYS ()
891 #ifdef SIGSYS
892 kill (getpid (), SIGSYS);
893 #else
894 handle_SYS (0);
895 #endif
896 return 0;
900 gen_PIPE ()
902 #ifdef SIGPIPE
903 kill (getpid (), SIGPIPE);
904 #else
905 handle_PIPE (0);
906 #endif
907 return 0;
911 gen_ALRM ()
913 #ifdef SIGALRM
914 kill (getpid (), SIGALRM);
915 #else
916 handle_ALRM (0);
917 #endif
918 return 0;
922 gen_URG ()
924 #ifdef SIGURG
925 kill (getpid (), SIGURG);
926 #else
927 handle_URG (0);
928 #endif
929 return 0;
933 gen_TSTP ()
935 #ifdef SIGTSTP
936 kill (getpid (), SIGTSTP);
937 #else
938 handle_TSTP (0);
939 #endif
940 return 0;
944 gen_CONT ()
946 #ifdef SIGCONT
947 kill (getpid (), SIGCONT);
948 #else
949 handle_CONT (0);
950 #endif
951 return 0;
955 gen_CHLD ()
957 #ifdef SIGCHLD
958 kill (getpid (), SIGCHLD);
959 #else
960 handle_CHLD (0);
961 #endif
962 return 0;
966 gen_TTIN ()
968 #ifdef SIGTTIN
969 kill (getpid (), SIGTTIN);
970 #else
971 handle_TTIN (0);
972 #endif
973 return 0;
977 gen_TTOU ()
979 #ifdef SIGTTOU
980 kill (getpid (), SIGTTOU);
981 #else
982 handle_TTOU (0);
983 #endif
984 return 0;
988 gen_IO ()
990 #ifdef SIGIO
991 kill (getpid (), SIGIO);
992 #else
993 handle_IO (0);
994 #endif
995 return 0;
999 gen_XCPU ()
1001 #ifdef SIGXCPU
1002 kill (getpid (), SIGXCPU);
1003 #else
1004 handle_XCPU (0);
1005 #endif
1006 return 0;
1010 gen_XFSZ ()
1012 #ifdef SIGXFSZ
1013 kill (getpid (), SIGXFSZ);
1014 #else
1015 handle_XFSZ (0);
1016 #endif
1017 return 0;
1021 gen_VTALRM ()
1023 #ifdef SIGVTALRM
1024 kill (getpid (), SIGVTALRM);
1025 #else
1026 handle_VTALRM (0);
1027 #endif
1028 return 0;
1032 gen_PROF ()
1034 #ifdef SIGPROF
1035 kill (getpid (), SIGPROF);
1036 #else
1037 handle_PROF (0);
1038 #endif
1039 return 0;
1043 gen_WINCH ()
1045 #ifdef SIGWINCH
1046 kill (getpid (), SIGWINCH);
1047 #else
1048 handle_WINCH (0);
1049 #endif
1050 return 0;
1054 gen_LOST ()
1056 #if defined(SIGLOST) && (!defined(SIGABRT) || SIGLOST != SIGABRT)
1057 kill (getpid (), SIGLOST);
1058 #else
1059 handle_LOST (0);
1060 #endif
1061 return 0;
1065 gen_USR1 ()
1067 #ifdef SIGUSR1
1068 kill (getpid (), SIGUSR1);
1069 #else
1070 handle_USR1 (0);
1071 #endif
1072 return 0;
1076 gen_USR2 ()
1078 #ifdef SIGUSR2
1079 kill (getpid (), SIGUSR2);
1080 #else
1081 handle_USR2 (0);
1082 #endif
1083 return 0;
1087 gen_PWR ()
1089 #ifdef SIGPWR
1090 kill (getpid (), SIGPWR);
1091 #else
1092 handle_PWR (0);
1093 #endif
1094 return 0;
1098 gen_POLL ()
1100 #if defined (SIGPOLL) && (!defined (SIGIO) || SIGPOLL != SIGIO)
1101 kill (getpid (), SIGPOLL);
1102 #else
1103 handle_POLL (0);
1104 #endif
1105 return 0;
1109 gen_WIND ()
1111 #ifdef SIGWIND
1112 kill (getpid (), SIGWIND);
1113 #else
1114 handle_WIND (0);
1115 #endif
1116 return 0;
1120 gen_PHONE ()
1122 #ifdef SIGPHONE
1123 kill (getpid (), SIGPHONE);
1124 #else
1125 handle_PHONE (0);
1126 #endif
1127 return 0;
1131 gen_WAITING ()
1133 #ifdef SIGWAITING
1134 kill (getpid (), SIGWAITING);
1135 #else
1136 handle_WAITING (0);
1137 #endif
1138 return 0;
1142 gen_LWP ()
1144 #ifdef SIGLWP
1145 kill (getpid (), SIGLWP);
1146 #else
1147 handle_LWP (0);
1148 #endif
1149 return 0;
1153 gen_DANGER ()
1155 #ifdef SIGDANGER
1156 kill (getpid (), SIGDANGER);
1157 #else
1158 handle_DANGER (0);
1159 #endif
1160 return 0;
1164 gen_GRANT ()
1166 #ifdef SIGGRANT
1167 kill (getpid (), SIGGRANT);
1168 #else
1169 handle_GRANT (0);
1170 #endif
1171 return 0;
1175 gen_RETRACT ()
1177 #ifdef SIGRETRACT
1178 kill (getpid (), SIGRETRACT);
1179 #else
1180 handle_RETRACT (0);
1181 #endif
1182 return 0;
1186 gen_MSG ()
1188 #ifdef SIGMSG
1189 kill (getpid (), SIGMSG);
1190 #else
1191 handle_MSG (0);
1192 #endif
1193 return 0;
1197 gen_SOUND ()
1199 #ifdef SIGSOUND
1200 kill (getpid (), SIGSOUND);
1201 #else
1202 handle_SOUND (0);
1203 #endif
1204 return 0;
1208 gen_SAK ()
1210 #ifdef SIGSAK
1211 kill (getpid (), SIGSAK);
1212 #else
1213 handle_SAK (0);
1214 #endif
1215 return 0;
1219 gen_PRIO ()
1221 #ifdef SIGPRIO
1222 kill (getpid (), SIGPRIO);
1223 #else
1224 handle_PRIO (0);
1225 #endif
1226 return 0;
1230 gen_33 ()
1232 #ifdef SIG33
1233 kill (getpid (), 33);
1234 #else
1235 handle_33 (0);
1236 #endif
1237 return 0;
1241 gen_34 ()
1243 #ifdef SIG34
1244 kill (getpid (), 34);
1245 #else
1246 handle_34 (0);
1247 #endif
1248 return 0;
1252 gen_35 ()
1254 #ifdef SIG35
1255 kill (getpid (), 35);
1256 #else
1257 handle_35 (0);
1258 #endif
1259 return 0;
1263 gen_36 ()
1265 #ifdef SIG36
1266 kill (getpid (), 36);
1267 #else
1268 handle_36 (0);
1269 #endif
1270 return 0;
1274 gen_37 ()
1276 #ifdef SIG37
1277 kill (getpid (), 37);
1278 #else
1279 handle_37 (0);
1280 #endif
1281 return 0;
1285 gen_38 ()
1287 #ifdef SIG38
1288 kill (getpid (), 38);
1289 #else
1290 handle_38 (0);
1291 #endif
1292 return 0;
1296 gen_39 ()
1298 #ifdef SIG39
1299 kill (getpid (), 39);
1300 #else
1301 handle_39 (0);
1302 #endif
1303 return 0;
1307 gen_40 ()
1309 #ifdef SIG40
1310 kill (getpid (), 40);
1311 #else
1312 handle_40 (0);
1313 #endif
1314 return 0;
1318 gen_41 ()
1320 #ifdef SIG41
1321 kill (getpid (), 41);
1322 #else
1323 handle_41 (0);
1324 #endif
1325 return 0;
1329 gen_42 ()
1331 #ifdef SIG42
1332 kill (getpid (), 42);
1333 #else
1334 handle_42 (0);
1335 #endif
1336 return 0;
1340 gen_43 ()
1342 #ifdef SIG43
1343 kill (getpid (), 43);
1344 #else
1345 handle_43 (0);
1346 #endif
1347 return 0;
1351 gen_44 ()
1353 #ifdef SIG44
1354 kill (getpid (), 44);
1355 #else
1356 handle_44 (0);
1357 #endif
1358 return 0;
1362 gen_45 ()
1364 #ifdef SIG45
1365 kill (getpid (), 45);
1366 #else
1367 handle_45 (0);
1368 #endif
1369 return 0;
1373 gen_46 ()
1375 #ifdef SIG46
1376 kill (getpid (), 46);
1377 #else
1378 handle_46 (0);
1379 #endif
1380 return 0;
1384 gen_47 ()
1386 #ifdef SIG47
1387 kill (getpid (), 47);
1388 #else
1389 handle_47 (0);
1390 #endif
1391 return 0;
1395 gen_48 ()
1397 #ifdef SIG48
1398 kill (getpid (), 48);
1399 #else
1400 handle_48 (0);
1401 #endif
1402 return 0;
1406 gen_49 ()
1408 #ifdef SIG49
1409 kill (getpid (), 49);
1410 #else
1411 handle_49 (0);
1412 #endif
1413 return 0;
1417 gen_50 ()
1419 #ifdef SIG50
1420 kill (getpid (), 50);
1421 #else
1422 handle_50 (0);
1423 #endif
1424 return 0;
1428 gen_51 ()
1430 #ifdef SIG51
1431 kill (getpid (), 51);
1432 #else
1433 handle_51 (0);
1434 #endif
1435 return 0;
1439 gen_52 ()
1441 #ifdef SIG52
1442 kill (getpid (), 52);
1443 #else
1444 handle_52 (0);
1445 #endif
1446 return 0;
1450 gen_53 ()
1452 #ifdef SIG53
1453 kill (getpid (), 53);
1454 #else
1455 handle_53 (0);
1456 #endif
1457 return 0;
1461 gen_54 ()
1463 #ifdef SIG54
1464 kill (getpid (), 54);
1465 #else
1466 handle_54 (0);
1467 #endif
1468 return 0;
1472 gen_55 ()
1474 #ifdef SIG55
1475 kill (getpid (), 55);
1476 #else
1477 handle_55 (0);
1478 #endif
1479 return 0;
1483 gen_56 ()
1485 #ifdef SIG56
1486 kill (getpid (), 56);
1487 #else
1488 handle_56 (0);
1489 #endif
1490 return 0;
1494 gen_57 ()
1496 #ifdef SIG57
1497 kill (getpid (), 57);
1498 #else
1499 handle_57 (0);
1500 #endif
1501 return 0;
1505 gen_58 ()
1507 #ifdef SIG58
1508 kill (getpid (), 58);
1509 #else
1510 handle_58 (0);
1511 #endif
1512 return 0;
1516 gen_59 ()
1518 #ifdef SIG59
1519 kill (getpid (), 59);
1520 #else
1521 handle_59 (0);
1522 #endif
1523 return 0;
1527 gen_60 ()
1529 #ifdef SIG60
1530 kill (getpid (), 60);
1531 #else
1532 handle_60 (0);
1533 #endif
1534 return 0;
1538 gen_61 ()
1540 #ifdef SIG61
1541 kill (getpid (), 61);
1542 #else
1543 handle_61 (0);
1544 #endif
1545 return 0;
1549 gen_62 ()
1551 #ifdef SIG62
1552 kill (getpid (), 62);
1553 #else
1554 handle_62 (0);
1555 #endif
1556 return 0;
1560 gen_63 ()
1562 #ifdef SIG63
1563 kill (getpid (), 63);
1564 #else
1565 handle_63 (0);
1566 #endif
1567 return 0;
1571 gen_TERM ()
1573 kill (getpid (), SIGTERM);
1574 return 0;
1578 main ()
1580 #ifdef usestubs
1581 set_debug_traps ();
1582 breakpoint ();
1583 #endif
1584 signal (SIGABRT, handle_ABRT);
1585 #ifdef SIGHUP
1586 signal (SIGHUP, handle_HUP);
1587 #endif
1588 #ifdef SIGQUIT
1589 signal (SIGQUIT, handle_QUIT);
1590 #endif
1591 #ifdef SIGILL
1592 signal (SIGILL, handle_ILL);
1593 #endif
1594 #ifdef SIGEMT
1595 signal (SIGEMT, handle_EMT);
1596 #endif
1597 #ifdef SIGFPE
1598 signal (SIGFPE, handle_FPE);
1599 #endif
1600 #ifdef SIGBUS
1601 signal (SIGBUS, handle_BUS);
1602 #endif
1603 #ifdef SIGSEGV
1604 signal (SIGSEGV, handle_SEGV);
1605 #endif
1606 #ifdef SIGSYS
1607 signal (SIGSYS, handle_SYS);
1608 #endif
1609 #ifdef SIGPIPE
1610 signal (SIGPIPE, handle_PIPE);
1611 #endif
1612 #ifdef SIGALRM
1613 signal (SIGALRM, handle_ALRM);
1614 #endif
1615 #ifdef SIGURG
1616 signal (SIGURG, handle_URG);
1617 #endif
1618 #ifdef SIGTSTP
1619 signal (SIGTSTP, handle_TSTP);
1620 #endif
1621 #ifdef SIGCONT
1622 signal (SIGCONT, handle_CONT);
1623 #endif
1624 #ifdef SIGCHLD
1625 signal (SIGCHLD, handle_CHLD);
1626 #endif
1627 #ifdef SIGTTIN
1628 signal (SIGTTIN, handle_TTIN);
1629 #endif
1630 #ifdef SIGTTOU
1631 signal (SIGTTOU, handle_TTOU);
1632 #endif
1633 #ifdef SIGIO
1634 signal (SIGIO, handle_IO);
1635 #endif
1636 #ifdef SIGXCPU
1637 signal (SIGXCPU, handle_XCPU);
1638 #endif
1639 #ifdef SIGXFSZ
1640 signal (SIGXFSZ, handle_XFSZ);
1641 #endif
1642 #ifdef SIGVTALRM
1643 signal (SIGVTALRM, handle_VTALRM);
1644 #endif
1645 #ifdef SIGPROF
1646 signal (SIGPROF, handle_PROF);
1647 #endif
1648 #ifdef SIGWINCH
1649 signal (SIGWINCH, handle_WINCH);
1650 #endif
1651 #if defined(SIGLOST) && (!defined(SIGABRT) || SIGLOST != SIGABRT)
1652 signal (SIGLOST, handle_LOST);
1653 #endif
1654 #ifdef SIGUSR1
1655 signal (SIGUSR1, handle_USR1);
1656 #endif
1657 #ifdef SIGUSR2
1658 signal (SIGUSR2, handle_USR2);
1659 #endif
1660 #ifdef SIGPWR
1661 signal (SIGPWR, handle_PWR);
1662 #endif
1663 #if defined (SIGPOLL) && (!defined (SIGIO) || SIGPOLL != SIGIO)
1664 signal (SIGPOLL, handle_POLL);
1665 #endif
1666 #ifdef SIGWIND
1667 signal (SIGWIND, handle_WIND);
1668 #endif
1669 #ifdef SIGPHONE
1670 signal (SIGPHONE, handle_PHONE);
1671 #endif
1672 #ifdef SIGWAITING
1673 signal (SIGWAITING, handle_WAITING);
1674 #endif
1675 #ifdef SIGLWP
1676 signal (SIGLWP, handle_LWP);
1677 #endif
1678 #ifdef SIGDANGER
1679 signal (SIGDANGER, handle_DANGER);
1680 #endif
1681 #ifdef SIGGRANT
1682 signal (SIGGRANT, handle_GRANT);
1683 #endif
1684 #ifdef SIGRETRACT
1685 signal (SIGRETRACT, handle_RETRACT);
1686 #endif
1687 #ifdef SIGMSG
1688 signal (SIGMSG, handle_MSG);
1689 #endif
1690 #ifdef SIGSOUND
1691 signal (SIGSOUND, handle_SOUND);
1692 #endif
1693 #ifdef SIGSAK
1694 signal (SIGSAK, handle_SAK);
1695 #endif
1696 #ifdef SIGPRIO
1697 signal (SIGPRIO, handle_PRIO);
1698 #endif
1699 #ifdef __Lynx__
1700 /* Lynx doesn't seem to have anything in signal.h for this. */
1701 signal (33, handle_33);
1702 signal (34, handle_34);
1703 signal (35, handle_35);
1704 signal (36, handle_36);
1705 signal (37, handle_37);
1706 signal (38, handle_38);
1707 signal (39, handle_39);
1708 signal (40, handle_40);
1709 signal (41, handle_41);
1710 signal (42, handle_42);
1711 signal (43, handle_43);
1712 signal (44, handle_44);
1713 signal (45, handle_45);
1714 signal (46, handle_46);
1715 signal (47, handle_47);
1716 signal (48, handle_48);
1717 signal (49, handle_49);
1718 signal (50, handle_50);
1719 signal (51, handle_51);
1720 signal (52, handle_52);
1721 signal (53, handle_53);
1722 signal (54, handle_54);
1723 signal (55, handle_55);
1724 signal (56, handle_56);
1725 signal (57, handle_57);
1726 signal (58, handle_58);
1727 signal (59, handle_59);
1728 signal (60, handle_60);
1729 signal (61, handle_61);
1730 signal (62, handle_62);
1731 signal (63, handle_63);
1732 #endif /* lynx */
1733 signal (SIGTERM, handle_TERM);
1735 x = 0;
1737 gen_ABRT ();
1738 gen_HUP ();
1739 gen_QUIT ();
1740 gen_ILL ();
1741 gen_EMT ();
1742 gen_FPE ();
1743 gen_BUS ();
1744 gen_SEGV ();
1745 gen_SYS ();
1746 gen_PIPE ();
1747 gen_ALRM ();
1748 gen_URG ();
1749 gen_TSTP ();
1750 gen_CONT ();
1751 gen_CHLD ();
1752 gen_TTIN ();
1753 gen_TTOU ();
1754 gen_IO ();
1755 gen_XCPU ();
1756 gen_XFSZ ();
1757 gen_VTALRM ();
1758 gen_PROF ();
1759 gen_WINCH ();
1760 gen_LOST ();
1761 gen_USR1 ();
1762 gen_USR2 ();
1763 gen_PWR ();
1764 gen_POLL ();
1765 gen_WIND ();
1766 gen_PHONE ();
1767 gen_WAITING ();
1768 gen_LWP ();
1769 gen_DANGER ();
1770 gen_GRANT ();
1771 gen_RETRACT ();
1772 gen_MSG ();
1773 gen_SOUND ();
1774 gen_SAK ();
1775 gen_PRIO ();
1776 gen_33 ();
1777 gen_34 ();
1778 gen_35 ();
1779 gen_36 ();
1780 gen_37 ();
1781 gen_38 ();
1782 gen_39 ();
1783 gen_40 ();
1784 gen_41 ();
1785 gen_42 ();
1786 gen_43 ();
1787 gen_44 ();
1788 gen_45 ();
1789 gen_46 ();
1790 gen_47 ();
1791 gen_48 ();
1792 gen_49 ();
1793 gen_50 ();
1794 gen_51 ();
1795 gen_52 ();
1796 gen_53 ();
1797 gen_54 ();
1798 gen_55 ();
1799 gen_56 ();
1800 gen_57 ();
1801 gen_58 ();
1802 gen_59 ();
1803 gen_60 ();
1804 gen_61 ();
1805 gen_62 ();
1806 gen_63 ();
1807 gen_TERM ();
1809 return 0;