Commit Graph

195 Commits

Author SHA1 Message Date
Ed Schouten d9d97c9f09 Make tests build on CloudABI.
There are some tests that need to be disabled on CloudABI specifically,
due to the fact that the shims cannot be built in combination with
unix::ext or windows::ext. Also improve the scoping of some imports to
suppress compiler warnings.
2018-01-11 11:28:34 +01:00
Loïc Damien 8fc4a24062 Fix an error in std::process documentation 2018-01-04 22:01:57 +01:00
kennytm 4ababefc55 Rollup merge of #46943 - malbarbo:process-test-busybox, r=alexcrichton
Fix process test when using busybox mkdir

busybox mkdir . returns 0
busybox mkdir ./ returns 1
2017-12-26 15:18:59 +08:00
Diggory Blake ccc91d7b48 Capture environment at spawn 2017-12-24 14:24:31 +00:00
Marco A L Barbosa dc71cab4df Fix process test when using busybox mkdir
busybox mkdir . returns 0
busybox mkdir ./ returns 1
2017-12-22 08:21:05 -02:00
Corey Farwell 2178e3a1b9 Clarify stdin behavior of Command::output.
Fixes #44929.
2017-11-22 20:47:31 -05:00
bors 7d475a28df Auto merge of #45295 - Technius:docs/process, r=steveklabnik
Improve std::process module docs

Addresses part of #29370

I've changed the first `cat` example to a "Hello World" example involving echo, and I've also added another example showing how to pipe output. I'm still working on the module-level description.

For now, I'd like feedback on the examples.

r? @steveklabnik
2017-10-29 06:24:20 +00:00
Bryan Tan 84ab6aec43 Add no_run to process examples involving unix commands 2017-10-28 20:27:05 -07:00
kennytm bea6136b4a Rollup merge of #45059 - tmccombs:pid, r=alexcrichton
Add current_pid function

Fixes #44971
2017-10-26 03:02:48 +08:00
steveklabnik f8f9005e57 Fix most rendering warnings from switching to CommonMark 2017-10-20 15:29:35 -04:00
Bryan Tan 3566832ef3 Add child process IO handling docs 2017-10-17 17:49:02 -07:00
kennytm 18f289559e Rollup merge of #45151 - Pirh:stdio_default_docs, r=frewsxcv
Document defaults for stdin, stdout, and stderr methods of Command

For #29370
2017-10-17 22:20:57 +08:00
Bryan Tan f67f6622b3 Create section on how to spawn processes; change module description 2017-10-15 19:45:07 -07:00
Bryan Tan bb74b13b74 Fix std::process hello world example 2017-10-15 13:11:14 -07:00
kennytm 430ac4ba50 Rollup merge of #45113 - Pirh:process_output_links, r=steveklabnik
Link std::process::Output to Command and Child

As per #29370
2017-10-15 14:21:51 +08:00
Bryan Tan e788e90bad Fixed accidental deletion of colon 2017-10-14 20:41:58 -07:00
Bryan Tan 5243a98b48 Add a brief description and two examples to std::process 2017-10-14 19:19:19 -07:00
Pirh 8c4a68dca1 Add line break after summary of process::Output 2017-10-13 18:18:09 +01:00
Pirh 210c91100f Remove misleading line on Windows Subsystem stdio 2017-10-10 17:58:13 +01:00
bors 5f578dfad0 Auto merge of #45141 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

- Successful merges: #44962, #45051, #45091, #45106, #45117, #45118, #45120, #45125, #45136
- Failed merges:
2017-10-10 08:30:10 +00:00
bors 13ae187043 Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundi
Migrate to eprint/eprintln macros where appropriate.

None
2017-10-10 02:54:14 +00:00
Pirh 6f653bb1b1 Document defaults for stdin, stdout, and stderr methods of Command 2017-10-09 19:20:07 +01:00
Pirh 32c4b71471 Link std::process::Output to Command and Child 2017-10-08 22:16:09 +01:00
Pirh 977200310a Remove ./ prefix from relative URLs
Also remove trailing whitespace to pass tidy checks.
2017-10-08 19:09:16 +01:00
Pirh 19029d5627 Add links and examples for std::process::Stdio
As per #29370
2017-10-08 17:12:14 +01:00
Thayne McCombs 29b319b6b2 Change current_pid to just id. 2017-10-07 20:59:58 -06:00
Thayne McCombs ba7575886e Add missing colon. 2017-10-07 00:55:58 -06:00
Thayne McCombs 6ff6b93560 Add current_pid function
Fixes #44971
2017-10-06 01:15:49 -06:00
Pirh 28ef0d1085 Document that process::abort will not call the panic hook 2017-10-02 19:59:50 +01:00
Corey Farwell 8ef5447815 Migrate to eprint/eprintln macros where appropriate. 2017-09-28 11:38:35 -04:00
Pirh 7ab20c850e Explain difference between panic! and abort in abort docs
As per #29370
2017-09-27 22:47:21 +01:00
Pirh 6dfa45d2ed Remove extraneous brackets from abort documentation
As per #29370
2017-09-27 21:13:07 +01:00
Corey Farwell 859ebef62f Add note about being blocked on input. 2017-09-21 21:11:11 -04:00
Corey Farwell 5ee7db6a0e Remove platform-specific terminology. 2017-09-21 21:01:51 -04:00
Corey Farwell a1f9052be7 Expand some of the std{in,out,err} usages. 2017-09-15 23:22:26 -04:00
Corey Farwell a6ef99e9f4 Indicate how ChildStd{in,out,err} FDs are closed.
Fixes https://github.com/rust-lang/rust/issues/41452.
2017-09-15 23:22:25 -04:00
Zack M. Davis 1b6c9605e4 use field init shorthand EVERYWHERE
Like #43008 (f668999), but _much more aggressive_.
2017-08-15 15:29:17 -07:00
Alex Crichton 8e7849e766 rustbuild: Use Cargo's "target runner"
This commit leverages a relatively new feature in Cargo to execute
cross-compiled tests, the `target.$target.runner` configuration. We configure it
through environment variables in rustbuild and this avoids the need for us to
locate and run tests after-the-fact, instead relying on Cargo to do all that
execution for us.
2017-07-28 18:00:31 -07:00
Petr Zemek 3cefd2b1d5 Add a missing verb to the description of std::process::ExitStatus::success().
"Signal termination not considered" -> "Signal termination is not considered"

The first line of the description was rewrapped so it fits into 80 characters.
2017-07-21 08:44:53 +02:00
Steven Fackler 14c2f99f80 Stabilize Command::envs
Closes #38526
2017-06-24 19:19:26 -07:00
kennytm 4711982314 Removed as many "```ignore" as possible.
Replaced by adding extra imports, adding hidden code (`# ...`), modifying
examples to be runnable (sorry Homura), specifying non-Rust code, and
converting to should_panic, no_run, or compile_fail.

Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-23 15:31:53 +08:00
Steven Fackler ecbb896b9e Add Read::initializer.
This is an API that allows types to indicate that they can be passed
buffers of uninitialized memory which can improve performance.
2017-06-20 20:26:22 -07:00
Josh Stone 9debe91675 Add conversions from File and Child* handles to Stdio
`Stdio` now implements `From<ChildStdin>`, `From<ChildStdout>`,
`From<ChildStderr>`, and `From<File>`.

The `Command::stdin`/`stdout`/`stderr` methods now take any type that
implements `Into<Stdio>`.

This makes it much easier to write shell-like command chains, piping to
one another and redirecting to and from files.  Otherwise one would need
to use the unsafe and OS-specific `from_raw_fd` or `from_raw_handle`.
2017-06-06 15:42:55 -07:00
bors f6cc40f168 Auto merge of #41904 - sfackler:1.18-stabilization, r=alexcrichton
Stabilize library features for 1.18.0

Closes #38863
Closes #38980
Closes #38903
Closes #36648

r? @alexcrichton

@rust-lang/libs
2017-05-21 22:06:08 +00:00
Steven Fackler 7c2cd93b2b Stabilize library features for 1.18.0
Closes #38863
Closes #38980
Closes #38903
Closes #36648
2017-05-20 21:58:47 -07:00
Michael Kohl b2fc7b1cbe Add documentation for ExitStatus
As requested in #29370.
2017-05-18 16:58:40 +07:00
Michael Gattozzi 28a4f57dd0 Update ChildStdin/ChildStdout docs to be clearer 2017-05-03 01:13:18 -04:00
Corey Farwell 7423966714 Fix incorrect hex value in doc comment example. 2017-05-01 20:38:59 -04:00
Corey Farwell 83e22b8b24 Rollup merge of #40812 - mgattozzi:ChildDocs, r=steveklabnik
Update `Child` docs to not have a note section

In #29370 it's noted that for "the Note shouldn't be one, and should come before
the examples." This commit changes the positioning of the section and removes
wording that said take note in order for it to flow better with the surrounding
text and it's new position.
2017-04-20 13:33:12 -04:00
Michael Gattozzi df383b9547 Fix link for wait 2017-04-19 14:00:50 -04:00