| 947 | unbounded amount of time when signals are not being processed. */ |
| 948 | |
| 949 | static void |
| 950 | process_signals (void) |
| 951 | { |
| 952 | while (interrupt_signal || info_signal_count) |
| 953 | { |
| 954 | int interrupt; |
| 955 | int infos; |
| 956 | sigset_t oldset; |
| 957 | |
| 958 | sigprocmask (SIG_BLOCK, &caught_signals, &oldset); |
| 959 | |
| 960 | /* Reload interrupt_signal and info_signal_count, in case a new |
| 961 | signal was handled before sigprocmask took effect. */ |
| 962 | interrupt = interrupt_signal; |
| 963 | infos = info_signal_count; |
| 964 | |
| 965 | if (infos) |
| 966 | info_signal_count = infos - 1; |
| 967 | |
| 968 | sigprocmask (SIG_SETMASK, &oldset, NULL); |
| 969 | |
| 970 | if (interrupt) |
| 971 | cleanup (); |
| 972 | print_stats (); |
| 973 | if (interrupt) |
| 974 | raise (interrupt); |
| 975 | } |
| 976 | } |
| 977 | |
| 978 | static void |
| 979 | finish_up (void) |
no test coverage detected