| 179 | /* send SIG avoiding the current process. */ |
| 180 | |
| 181 | static int |
| 182 | send_sig (pid_t where, int sig) |
| 183 | { |
| 184 | /* If sending to the group, then ignore the signal, |
| 185 | so we don't go into a signal loop. Note that this will ignore any of the |
| 186 | signals registered in install_cleanup(), that are sent after we |
| 187 | propagate the first one, which hopefully won't be an issue. Note this |
| 188 | process can be implicitly multithreaded due to some timer_settime() |
| 189 | implementations, therefore a signal sent to the group, can be sent |
| 190 | multiple times to this process. */ |
| 191 | if (where == 0) |
| 192 | signal (sig, SIG_IGN); |
| 193 | return kill (where, sig); |
| 194 | } |
| 195 | |
| 196 | /* Signal handler which is required for sigsuspend() to be interrupted |
| 197 | whenever SIGCHLD is received. */ |