x11-servers/xorg-server: fix server stopping when started in the background #582

Open
Defenso-QTH opened 7:40am on August 14, 2026 wants to merge 63 ฮ” into freebsd/freebsd-ports main from
fix-xorg-background-current-vt
Diff Delta:
63
About 33 Diff Delta/hour
Classified as:  Bug Fix

Defenso-QTH's Description of Work

Starting the server in a background process group on the VT it is about to take over -- "X vtN &", or a display manager such as Ly that forks and runs the server in the child -- leaves it stopped (state T) with the console in KD_GRAPHICS, and its log ends at "(++) using VT number N".

Our existing patch calls tcsetattr() to put the tty in raw mode but ioctl TIOCSETA triggers SIGTTOU in tty_wait_background.

Do what the Linux code does instead: join the parent process group so we are not a group leader (setsid() fails for one), then setsid() into a new session with no controlling terminal.

Sponsored by: Defenso

2 total changed files
Loading changes...
Loading changes...
You've reached the end of this PR review
Thus concludes todayโ€™s episode of โ€œJust One Small Changeโ€