summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTwaik Yont <9674930+twaik@users.noreply.github.com>2025-04-10 17:55:58 +0300
committerMarge Bot <marge-bot@fdo.invalid>2025-07-19 21:42:37 +0000
commit5568b0f83f388a295f42d49411ced17387043794 (patch)
treeeeec65d688c23f7287b3d137a17e1b97e77852c6 /doc
parent9b6f72395ae8b10f2c4a42d26f56e6dceaeb49f9 (diff)
os: use close-on-exec for X server socket to prevent fd leaksHEADmaster
In most typical Linux X servers (like Xvfb, Xephyr, or Xwayland), no child process outlives the server, so this issue rarely arises. However, in embedded X servers (based on Xvfb or Kdrive) or in custom Xorg modules, the server might launch a long-running command with regular fork+exec calls. If the X server crashes or exits while that command is still running (for example, it spawns a tombstone generator or any process that hangs or turns to zombie), the file descriptor associated with the abstract socket can remain open in the child process. This leads to the kernel refusing to allow another X server to bind the same socket until the child process terminates (because there is no explicit way to unlink abstract socket, unlike Unix socket). By marking the file descriptor as close-on-exec, we ensure it is automatically closed in child processes, preserving the ability of a new X server process to bind the socket immediately. Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1906>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions