Antoine Pitrou created ARROW-17975: -------------------------------------- Summary: [C++] Create after-fork facility Key: ARROW-17975 URL: https://issues.apache.org/jira/browse/ARROW-17975 Project: Apache Arrow Issue Type: Wish Components: C++ Reporter: Antoine Pitrou
Currently, to ensure fork safety when dealing with system resources, we add hand-baked getpid() tests in relevant APIs. We could instead have a centralized after-fork facility such as: {code:c++} AfterForkToken RegisterAtFork(std::function<void()> after_fork); {code} The returned token would have to be kept alive for as long as the after-fork callbacks are to be registered. (a more elaborate overload with before-fork, after-fork-in-parent, after-fork-in-child callbacks could also be added if necessary) -- This message was sent by Atlassian Jira (v8.20.10#820010)