• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / agterm / 30774157332
98%

Build:
DEFAULT BRANCH: master
Ran 03 Aug 2026 12:20AM UTC
Jobs 1
Files 86
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Aug 2026 12:17AM UTC coverage: 97.713% (+0.005%) from 97.708%
30774157332

push

github

web-flow
fix(control): report foreground for panes with no job-control shell (#358)

* fix(control): report foreground for panes with no job-control shell

libghostty's foreground pid is `tcgetpgrp`, a process GROUP id. An interactive
shell puts each job in its own group, so the leader is the program. A pane
started with `--command` has no job-control shell, so its program stays in the
group led by setuid-root `login`, whose argv `KERN_PROCARGS2` refuses for a
non-root caller. Every such pane read as idle in `tree`.

the tree read (`ForegroundProcess.running`) now descends the group to the first
readable member and strips the login dash from argv[0]. The restore capture
(`.command`) deliberately does not: a non-nil capture sets `hadForeground`,
which preempts `initialCommand` in `restorePlan` and would restore a
`--command` session by typing into a login shell instead of taking the exec
path, losing the `--wait` hold and close-on-exit.

selection and dash-stripping are pure helpers in agtermCore with unit tests;
only the sysctl stays app-side.

* fix(control): select the foreground pane process by parentage

review round 1 on 9fba6bd. Descent picked the lowest pid in the group, which
is wrong twice: a pipeline under a job-control shell puts every element in the
leader's group while parenting them to the shell, so `sudo tail | grep` would
report `grep`; and macOS recycles pids past 99999, so a grandchild forked after
the wrap sorts below the program that spawned it and gets reported instead.

selection now keys on `kp_eproc.e_ppid` and keeps only the leader's own
children, which restores the documented "omitted for a setuid foreground"
promise: sudo's child runs as root and stays unreadable, and a pipeline sibling
is not the leader's child. A `--command` program is login's direct child, so
the case this series fixes is unaffected.

processGroup also kept a partial `KERN_PROC_PGRP` result on ENOMEM instead of
discarding it. The group growing past the first call'... (continued)

15 of 15 new or added lines in 1 file covered. (100.0%)

6921 of 7083 relevant lines covered (97.71%)

4244864.08 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30774157332.1 03 Aug 2026 12:20AM UTC 86
97.71
GitHub Action Run
Source Files on build 30774157332
  • Tree
  • List 86
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30774157332
  • 07ff6a78 on github
  • Prev Build on master (#30773127737)
  • Next Build on master (#30797770386)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc