Skip to content

Conversation

alexcrichton
Copy link
Member

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little unfortunate that these are still taking strings, since that requires e.g. incorrectly converting Paths to strings on Unix systems. I don't really know a good solution, though. Maybe the BytesContainer trait?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I think that change may be out of the scope of this PR, however. Last I tried to do something like that it had horrible fallback everywhere and was incredibly painful to use, so it ended up being a false start.

The corresponding issue, however, is #11650 which is indeed on the 1.0 milestone.

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 rust-lang#2625
Closes rust-lang#10016
bors added a commit that referenced this pull request Feb 24, 2014
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
@bors bors closed this Feb 24, 2014
@bors bors merged commit a9bd447 into rust-lang:master Feb 24, 2014
@alexcrichton alexcrichton deleted the run-rewrite branch February 24, 2014 07:28
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
fix: f32 and f64 representation during lowering

should fix rust-lang#12380
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 7, 2024
[`redundant_closure_call`]: Don't lint if closure origins from a macro

The following code used to trigger the lint:
```rs
 macro_rules! make_closure {
     () => {
         (|| {})
     };
 }
 make_closure!()();
```
The lint would suggest to replace `make_closure!()()` with `make_closure!()`, which changes the code and removes the call to the closure from the macro. This commit fixes that.

Fixes rust-lang#12358

----

changelog: [`redundant_closure_call`]: If `x!()` returns a closure, don't suggest replacing `x!()()` with `x!()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std::run::test_pipes is xfail'd Rewrite std::run

3 participants