Tableflip is a zero-downtime restart library and system utility designed to transfer network sockets and open file descriptors between process instances. It serves as a process lifecycle manager that coordinates the handoff of TCP, UDP, and Unix domain sockets from a parent process to a child process to maintain active sessions during service upgrades.
The tool facilitates seamless restarts by utilizing file-based process ID tracking and system signals to trigger the spawning of new process instances. It ensures continuous service availability by handing over network listeners and using readiness signaling to notify parent processes when a new instance is prepared to take over.
The library also manages the transition phase through graceful shutdown coordination, which includes draining existing connections and synchronizing process exits. This is supported by low-level primitives for managing file descriptor transitions and signal-driven lifecycle events.