folly::AtFork

AtFork

Synopsis

Declared in <folly/system/AtFork.h>

class AtFork;

Description

Wraps pthread_atfork on platforms with pthread_atfork, but with additional facilities.

Type Aliases

NameDescription
fork_t Signature of a fork function.

Static Member Functions

NameDescription
forkInstrumented Performs a fork with the registered handlers invoked around it.
init Initializes the AtFork singleton, installing the pthread_atfork handlers.
registerHandler Registers a set of fork handlers indexed by handle.
unregisterHandler Unregisters the set of fork handlers identified by handle.