-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support non-blocking calls #9
Comments
(Continued from reddit) For asynchronous command execution, there's two scenarios to consider. First, running a command in the background with one or more of its stdin/stdout/stderr connected to an iostream. Might be worth looking into Boost.Process's pipe streams and buffers as an example of a fairly lightweight way to provide such streams. You still need a way to get a command's exit status when it finishes running (Just getting EOF on a pipe isn't enough). Second, the case where you just want to capture the output in a string. My idea for this (Which can also be used for the exit status of the first case and possibly even in executing pipelines of multiple commands) is to have a It'd look something like
|
As you are designing the async API, here are a few thoughts that came up:
|
Work in progress at https://github.com/shawnw/subprocess/tree/async_promises (At the moment just uses futures for waiting for processes to exit in |
No description provided.
The text was updated successfully, but these errors were encountered: