Add folly::get_cached_pid()
Summary: The function folly::get_cached_pid() saves and reuses the result of calling getpid(). At fork, the value is updated for the child process. It is thread-safe. The first call is async-signal-unsafe but subsequent calls are async-signal-safe. Reviewed By: yfeldblum, davidtgoldblatt Differential Revision: D23433702 fbshipit-source-id: a026300206c1726fc1c2c6a588828f2e6559c4e2
Showing
folly/system/Pid.cpp
0 → 100644
folly/system/Pid.h
0 → 100644
Please register or sign in to comment