| 89 | } |
| 90 | |
| 91 | static void |
| 92 | setup_handler() |
| 93 | { |
| 94 | struct sigaction sa; |
| 95 | |
| 96 | /* Set up a signal handler for timeouts */ |
| 97 | sa.sa_flags = SA_SIGINFO; |
| 98 | sa.sa_sigaction = timeout_handler; |
| 99 | sigemptyset(&sa.sa_mask); |
| 100 | if (sigaction(g_sig_num, &sa, NULL) == -1) { |
| 101 | handleError("sigaction"); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | static timer_t |
| 106 | make_timer() |