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

pantsbuild / pants / 24462635203 / 10
80%
main: 93%

Build:
Build:
LAST BUILD BRANCH: delete-tools
DEFAULT BRANCH: main
Ran 15 Apr 2026 04:11PM UTC
Files 1192
Run time 38s
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

15 Apr 2026 03:16PM UTC coverage: 42.549%. First build
24462635203.10

push

github

web-flow
Fix sandboxer daemon inheriting parent stdin/stdout file descriptors (Cherry-pick of #23246) (#23253)

## Summary
- Redirect the sandboxer daemon's stdin and stdout to `/dev/null` when
spawning, preventing it from holding the parent's file descriptors open
indefinitely
- Only stderr was previously redirected (to a logfile); stdin/stdout
used Tokio's default (`Stdio::inherit()`), causing hangs when the
parent's stdout was a pipe or regular file

## Context

Fixes #23169

When the sandboxer daemon is spawned without explicit stdin/stdout
configuration, it inherits the parent's file descriptors. If those FDs
are pipes (e.g., `pants ... | grep`, pre-commit hooks, IDE integrations,
AI coding tools capturing output) or regular files, the sandboxer holds
them open for its lifetime, preventing EOF and causing the caller to
hang.

The sandboxer communicates exclusively via a Unix domain socket and
never reads stdin or writes stdout. All logging goes to stderr via
`env_logger`. This change matches the existing pattern used by other
process runners in the codebase (`local.rs`, `workspace.rs`).

## Test plan
- [x] `cargo test -p sandboxer` passes (3 tests)
- [x] FD inspection before/after: verified the sandboxer's FD 1 changes
from inherited `REG pants.log` to `CHR /dev/null` across all three
stdout contexts (see [test
script](https://gist.github.com/tarekrached/30c7f05cdf4eb6dd0975fe3d91697701)
and [verification
comment](https://github.com/pantsbuild/pants/pull/23246#issuecomment-4239525830))

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Tarek Rached <tarek.rached@equilibriumenergy.com>

26662 of 62662 relevant lines covered (42.55%)

0.43 hits per line

Source Files on job test_python_linux_x86_64_7/10 - 24462635203.10
  • Tree
  • List 1192
  • Changed 569
  • Source Changed 0
  • Coverage Changed 569
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24462635203
  • 8c27fe87 on github
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