Run interactive processes directly on the PTY#2868
Open
gaggle wants to merge 1 commit into
Open
Conversation
I was seeing interactive processes (`process-compose.is_interactive = true`) not properly receiving input. Claude says it's because devenv-tasks capture the child's stdout/stderr on pipes, causing the interactive program to never own the process-compose PTY for output. And thus: no prompt appeared, output was block-buffered, and a REPL looked dead. With this change interactive processes now bypass devenv-tasks and use their `exec` directly, so process-compose runs them straight on its PTY. But.. that also means an interactive process no longer goes through devenv-tasks, so its before/after task dependencies and DEVENV_TASK_* env injection mechanisms are not applied. Is that acceptable? I'm not sure that I'm enough of an expert to understand the full implication of this change. But I'm providing this PR in case a maintainer can verify it adds value or can provide feedback on how this might be better approached.
60aaea4 to
35f02f0
Compare
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.
I was seeing interactive processes via process-compose (
process-compose.is_interactive = true)not properly receiving input:
Claude says it's because devenv-tasks capture the child's stdout/stderr on pipes, causing the interactive program to never own the process-compose PTY for output. And thus: no prompt appeared, output was block-buffered, and a REPL looked dead.
With this change interactive processes now bypass devenv-tasks and use their
execdirectly, so process-compose runs them straight on its PTY.But.. that also means an interactive process no longer goes through devenv-tasks, so its before/after task dependencies and DEVENV_TASK_* env injection mechanisms are not applied. Is that acceptable?
I'm not sure that I'm enough of an expert to understand the full implication of this change, and I can't seem to run the tests locally (getting
Problem with the SSL CA certerrors) so I worked blind. But I'm providing this PR in case a maintainer can verify it adds value or can provide feedback on how this might be better approached.