| 231 | } |
| 232 | |
| 233 | void DoHandleSignal(int signum) { |
| 234 | // async-signal-safe code only |
| 235 | SelfPipe* self_pipe = self_pipe_ptr_.load(); |
| 236 | if (self_pipe) { |
| 237 | self_pipe->Send(/*payload=*/signum); |
| 238 | } |
| 239 | ReinstateSignalHandler(signum, &HandleSignal); |
| 240 | } |
| 241 | |
| 242 | static void ReceiveSignals(std::shared_ptr<SelfPipe> self_pipe) { |
| 243 | // Wait for signals on the self-pipe and propagate them to the current StopSource |
no test coverage detected