Repository navigation
Support terminal foreground process groups - #1714
Merged
Merged
Conversation
The broker core now owns the controlling terminal's job-control state, like a kernel's terminal layer: the terminal controls the first root process's session and delivers its events to a foreground process group that processes in the session can query and change. Terminal endpoints keep handling only terminal I/O controls. The Linux shim implements TIOCGPGRP, TIOCSPGRP, and TIOCGSID on top, mapping the broker's generic errors to Linux errnos. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
The foreground process group is session state, not a terminal operation. Get and set it through ProcessGroupRequest with a handle to the controlling terminal, reporting guest-visible failures as ProcessGroupError, so terminal endpoints handle only I/O. The shim maps the job-control ioctls onto the new LiteBox process API. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
An endpoint may post events while attaching, and posting takes the process tree lock. Also make the job-control fixture's interrupt check independent of the inherited SIGINT disposition and mask. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1172b488-1351-40c1-a6d0-32f5277af568
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/tty-job-control
branch
from
October 26, 2026 20:11
7788457 to
3633a5d
Compare
Weidong Cui (wdcui)
enabled auto-merge
October 26, 2026 20:17
|
🤖 SemverChecks 🤖 Click for details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds terminal job control. The broker core now tracks a foreground process group for the controlling terminal's session and sends terminal events such as Ctrl-C to that group instead of the first root's group. Processes in the session query and change it through new process-group requests that take a handle to the terminal and report generic errors. The Linux shim implements
tcgetpgrp,tcsetpgrp, andtcgetsidon top, mapping those errors to Linux errnos. Unit and end-to-end tests are included.