This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A minimal, sequential demonstration of UNIX Domain Socket (UDS) failure. | |
This script illustrates a common pitfall with datagram (SOCK_DGRAM) UDS sockets. | |
When a client uses `connect()` on a UDS socket, it doesn't connect to the | |
filesystem *path*, but rather to the underlying kernel object, which is | |
identified by its inode. | |
If the server process restarts and recreates the socket at the same path, | |
a new file with a new inode is created. The already-connected client, however, |