Commit Graph

203 Commits

Author SHA1 Message Date
Tyler Mandry
b6934c91b2 termination_trait: Put examples in error help, not label 2018-03-21 13:32:46 -05:00
Tyler Mandry
94bdeb64f9 termination_trait: Add () example to error message 2018-03-21 00:26:00 -05:00
Scott McMurray
74c5c6e6cb Move process::ExitCode internals to sys
Now begins the saga of fixing compilation errors on other platforms...
2018-03-03 18:44:44 -08:00
Scott McMurray
2ce2b40ee5 Fix linkchecker 2018-02-28 23:34:20 -08:00
Scott McMurray
fc2e4e7833 Put some thought and documentation effort into process::ExitCode 2018-02-27 10:31:17 -08:00
Scott McMurray
e20f7b2ea7 Restrict the Termination impls to simplify stabilization
Make a minimal commitment for stabilization.  More impls are likely in future, but are not necessary at this time.
2018-02-24 23:51:08 -08:00
Niko Matsakis
5f1e78f19a move Termination trait to std::process 2018-02-22 17:57:08 -05:00
Corentin Henry
077d3434aa add test checking that process::Command is Send 2018-01-26 08:21:58 -08:00
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