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

Pull Request Overview

  • Opened on August 14, 2026
  • Status Open
  • Commit count 1 with first commit August 14, 2026

Total Delta

63 Total Diff Delta

Open Days

Open 26 weekdays

Test Delta

0 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
 
0.5 days Authoring 1 commit before pull request opened for review
 
0.5 days Awaiting first review
 
25.0 days Revising work with 0 commits in response to 0 reviews that left 1 comment

Total time for pull request still awaiting merge (longer than repo's target): 26.0 business days

Author avatar

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

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

Comments Threads Pending Resolution

Resolved Comment Threads

No resolved comments have been left on this PR.