Skip to content

run appears to be stuck (due to buffer limit?) #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
itingliu opened this issue May 14, 2025 · 3 comments
Open

run appears to be stuck (due to buffer limit?) #44

itingliu opened this issue May 14, 2025 · 3 comments
Assignees
Labels
blocker Show stopping issues for 0.0.1 bug Something isn't working

Comments

@itingliu
Copy link
Contributor

let result = try await Subprocess.run(
    .path("/bin/cat"),
    arguments: ["path/to/some/large/text/file.txt]
)

This looks like it is stuck and never returns. It is because the file content exceeds the default limit, and cat is waiting to write more to the output buffer.

@itingliu itingliu added the bug Something isn't working label May 14, 2025
@iCharlesHu
Copy link
Contributor

iCharlesHu commented May 15, 2025

For this one we decided to just remove the default buffer size limit, but still allow you to set one if you choose to.

@iCharlesHu iCharlesHu self-assigned this May 15, 2025
@iCharlesHu iCharlesHu added the blocker Show stopping issues for 0.0.1 label May 16, 2025
@weissi
Copy link

weissi commented May 23, 2025

That doesn't sound like the right fix. If something blows past the 'maximum bytes collect' limit, you should throw an error (potentially giving the user what we have so far).

Just raising the buffer won't help, try cat /dev/zero

@iCharlesHu
Copy link
Contributor

Update: we decided to throw an error instead of raising the limit. This is the same default behavior with AsyncBufferSequence.LineSequence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Show stopping issues for 0.0.1 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants