MCPcopy Create free account
hub / github.com/apache/arrow / ChildAfterFork

Method ChildAfterFork

cpp/src/arrow/util/cancel.cc:273–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271 void ParentAfterFork() { mutex_.unlock(); }
272
273 void ChildAfterFork() {
274 new (&mutex_) std::mutex;
275 // Leak previous thread, as it has become invalid.
276 // We can't spawn a new one here as it would have unfortunate side effects;
277 // especially in the frequent context of a fork+exec.
278 // (for example the Python subprocess module closes all fds before calling exec)
279 ARROW_UNUSED(signal_receiving_thread_.release());
280 // Make internal state consistent: with no listening thread, we shouldn't
281 // feed the self-pipe from the signal handler.
282 UnregisterHandlers();
283 }
284
285 std::mutex mutex_;
286 std::vector<SavedSignalHandler> saved_handlers_;

Callers 1

InitMethod · 0.95

Calls 1

releaseMethod · 0.45

Tested by

no test coverage detected