Skip to content

Conversation

@ghostwriternr
Copy link
Member

Commands previously inherited stdin from the parent bash shell
(a pipe for script input), causing hangs when they attempted
to read stdin for TTY detection or interactive prompts.

Redirecting to /dev/null ensures commands receive EOF
immediately, enforcing non-interactive behavior and preventing
indefinite hangs.

Applies to both foreground (exec) and background
(execStream/startProcess) execution modes.

Commands previously inherited stdin from the parent bash shell
(a pipe for script input), causing hangs when they attempted
to read stdin for TTY detection or interactive prompts.

Redirecting to /dev/null ensures commands receive EOF
immediately, enforcing non-interactive behavior and preventing
indefinite hangs.

Applies to both foreground (exec) and background
(execStream/startProcess) execution modes.
@changeset-bot
Copy link

changeset-bot bot commented Oct 23, 2025

🦋 Changeset detected

Latest commit: 70c79b0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@repo/sandbox-container Patch
@cloudflare/sandbox Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ghostwriternr ghostwriternr changed the title Redirect stdin to /dev/null in command execution Fix commands hanging when reading stdin Oct 23, 2025
@cloudflare cloudflare deleted a comment from claude bot Oct 23, 2025
@cloudflare cloudflare deleted a comment from claude bot Oct 23, 2025
@cloudflare cloudflare deleted a comment from claude bot Oct 23, 2025
@whoiskatrin whoiskatrin self-requested a review October 23, 2025 17:56
@ghostwriternr ghostwriternr merged commit c39674b into main Oct 23, 2025
8 checks passed
@ghostwriternr ghostwriternr deleted the fix/stdin-redirect-to-dev-null branch October 23, 2025 17:56
@threepointone threepointone mentioned this pull request Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants