Draft: UNIX sockets: Don't unlink an existing socket before binding a new one
Running the X server as root makes the unlink operation always succeed, as well as the subsequent socket binding (socket creation in the file system). But success in binding a new socket is used to detect in-use displays when specifying "-displayfd". So, when running as root, :0 is never detected as been used and its socket is systematically crushed, rendering the existing :0 session stale.
Moreover, sockets are cleaned up by the X server, even in case of abnormal termination.
For issue #4.
If you find this change too drastic, I may instead be able to fix the problem in the server directly, see related issue xorg/xserver#1139.