cptr::detail::fork_safe_lock

A spin lock that is held across fork(), like cage's own lock, so that a child never starts with it taken by a thread that does not exist there. Every live fork_safe_lock is in one list, which a single pthread_atfork handler locks in order before fork() and unlocks after it.

Synopsis

Declared in <cptr/user_cage.hpp>

class fork_safe_lock;

Member Functions

NameDescription
fork_safe_lock [constructor]Constructors
~fork_safe_lock [destructor]Destructor
operator= [deleted]Copy assignment operator
lock
unlock