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

Stale Open
Defenso-QTH opened 6:40am on August 14, 2026 wants to merge 111 Ξ” into freebsd/freebsd-ports main from
fix-xorg-background-current-vt
Diff Delta:
111
About 33 Diff Delta/hour
Classified as:  General

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 made it to the end of the scroll.
The diff well is dry.