| 163 | }; // namespace |
| 164 | |
| 165 | void RegisterAtFork(std::weak_ptr<AtForkHandler> weak_handler) { |
| 166 | // Only fetch the atfork state (and thus lazily call pthread_atfork) if enabled at all, |
| 167 | // to minimize potential nastiness with fork and threads. |
| 168 | if (IsAtForkEnabled()) { |
| 169 | GetAtForkState()->RegisterAtFork(std::move(weak_handler)); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | } // namespace internal |
| 174 | } // namespace arrow |