Index: x11/xtrans/files/patch-no_unix_socket_unlink_before_bind-Xtranssock.c =================================================================== --- x11/xtrans/files/patch-no_unix_socket_unlink_before_bind-Xtranssock.c (nonexistent) +++ x11/xtrans/files/patch-no_unix_socket_unlink_before_bind-Xtranssock.c (copie de travail) @@ -0,0 +1,20 @@ +Don't unlink an existing socket before binding. + +Sockets are normally cleaned up by the X server. Running the server as root +makes the unlink operation always succeed, as well as the subsequent socket +binding (creation in the file system). But success in binding a new socket is +used to detect in-use displays when using -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. + +--- Xtranssock.c 2019-03-16 22:30:31.000000000 +0100 ++++ Xtranssock.c 2021-02-04 16:30:09.853117000 +0100 +@@ -1004,8 +1004,6 @@ + sockname.sun_path[0] = '\0'; + namelen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&sockname.sun_path[1]); + } +- else +- unlink (sockname.sun_path); + + if ((status = TRANS(SocketCreateListener) (ciptr, + (struct sockaddr *) &sockname, namelen, flags)) < 0) Property changes on: x11/xtrans/files/patch-no_unix_socket_unlink_before_bind-Xtranssock.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property