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

stacklok / toolhive / 19936875169
59%

Build:
DEFAULT BRANCH: main
Ran 04 Dec 2025 04:55PM UTC
Jobs 1
Files 391
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

04 Dec 2025 04:52PM UTC coverage: 49.807% (+0.01%) from 49.797%
19936875169

push

github

web-flow
Gracefully Shutdown Foreground Server on Interrupt (#2863)

The solution here avoids the competing signal handlers by:

Removing the os.Exit(0) from the default handler.
When the default handler receives a signal, cancel the context that is plumbed to the run command.
Remove the run signal handler and instead rely on context cancellation.
This solution is not without risk: Commands that don’t check for context cancellation and relied on the os.Exit(0) may now continue running until they hit code that does respect the context cancellation. Based on my understanding of the code, thv run --foreground is one of the few commands that can be long running, so I think this risk is relatively small.

Beyond the scope of this pull request, I think we should prefer to rely on context cancellation rather than using signal.Notify deep in the implementation of commands. This “competing signal handlers” problem likely exists elsewhere: I count 10 uses of signal.Notify.

---------

Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>

0 of 10 new or added lines in 2 files covered. (0.0%)

26222 of 52647 relevant lines covered (49.81%)

59.54 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
0.0
0.0% pkg/runner/runner.go
8
0.0
0.0% cmd/thv/main.go
Jobs
ID Job ID Ran Files Coverage
1 19936875169.1 04 Dec 2025 04:55PM UTC 391
49.81
GitHub Action Run
Source Files on build 19936875169
  • Tree
  • List 391
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19936875169
  • 5ab6183a on github
  • Prev Build on main (#19936707466)
  • Next Build on main (#19936888688)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc