-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rewrite std::run #2625
Comments
|
Here are some things I think are issues with
This is awkward because if (for example) you have been using Ideally I think there would be just one API call to start a process, and that call would return a
Does anyone else feel that these are issues? Should they be solved in ways other than I suggested? If there are no problems with the above then I will try to submit some pull requests. |
Whilst preparing some fixes/refactoring I found another issue: One can keep reading from a I.e.:
Produces, when run:
|
cc #6436 |
mentioned in rust-lang#2625. This change makes the module more oriented around Process values instead of having to deal with process ids directly. Apart from issues mentioned in rust-lang#2625, other changes include: - Changing the naming to be more consistent - Process/process is now used instead of a mixture of Program/program and Process/process. - More docs/tests. Some io/scheduler related issues remain (mentioned in rust-lang#2625).
...mentioned in #2625. This change makes the module more oriented around Process values instead of having to deal with process ids directly. Apart from issues mentioned in #2625, other changes include: - Changing the naming to be more consistent - Process/process is now used instead of a mixture of Program/program and Process/process. - More docs/tests. Some io/scheduler related issues remain (mentioned in #2625). I am not sure how best to address these.
�Visiting for triage, email from 2013 sep 23. So I'm going to attempt to build a checklist here of the items listed above, so we can determine if this ticket is complete.
|
The std::run module is a relic from a standard library long since past, and there's not much use to having two modules to execute processes with where one is slightly more convenient. This commit merges the two modules, moving lots of functionality from std::run into std::io::process and then deleting std::run. New things you can find in std::io::process are: * Process::new() now only takes prog/args * Process::configure() takes a ProcessConfig * Process::status() is the same as run::process_status * Process::output() is the same as run::process_output * I/O for spawned tasks is now defaulted to captured in pipes instead of ignored * Process::kill() was added (plus an associated green/native implementation) * Process::wait_with_output() is the same as the old finish_with_output() * destroy() is now signal_exit() * force_destroy() is now signal_kill() Closes #2625 Closes #10016
Co-authored-by: Adrian Palacios <[email protected]>
Original title: "Rewrite core::run"
As per a FIXME,
// Spawn two entire schedulers to read both stdout and sterr // in parallel so we don't deadlock while blocking on one // or the other. FIXME: Surely there's a much more clever way // to do this.
The text was updated successfully, but these errors were encountered: