-
What's the best way to run a shell command in an async task? I would like the task to read stdout (perhaps with something like Open3.popen2e) as the command writes to it, so I can complete the task or timeout as needed. |
Beta Was this translation helpful? Give feedback.
Answered by
ioquatix
Jun 12, 2023
Replies: 1 comment 1 reply
-
With Async 2+ it just works, and you don't need any custom code, it's all non-blocking, including |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ioquatix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With Async 2+ it just works, and you don't need any custom code, it's all non-blocking, including
Process.wait
et al, reading and writing to the child process (via pipes), etc. Let me know if you run into any issues. Feel free to create one task to read and one to write, etc, depending on your requirements.