proxygen
folly::Subprocess::DangerousPostForkPreExecCallback Struct Referenceabstract

#include <Subprocess.h>

Inheritance diagram for folly::Subprocess::DangerousPostForkPreExecCallback:
WriteFileAfterFork

Public Member Functions

virtual ~DangerousPostForkPreExecCallback ()
 
virtual int operator() ()=0
 

Detailed Description

See Subprocess::Options::dangerousPostForkPreExecCallback() for usage. Every derived class should include the following warning:

DANGER: This class runs after fork in a child processes. Be fast, the parent thread is waiting, but remember that other parent threads are running and may mutate your state. Avoid mutating any data belonging to the parent. Avoid interacting with non-POD data that originated in the parent. Avoid any libraries that may internally reference non-POD data. Especially beware parent mutexes – for example, glog's LOG() uses one.

Definition at line 287 of file Subprocess.h.

Constructor & Destructor Documentation

virtual folly::Subprocess::DangerousPostForkPreExecCallback::~DangerousPostForkPreExecCallback ( )
inlinevirtual

Definition at line 288 of file Subprocess.h.

288 {}

Member Function Documentation

virtual int folly::Subprocess::DangerousPostForkPreExecCallback::operator() ( )
pure virtual

Implemented in WriteFileAfterFork.


The documentation for this struct was generated from the following file: