about summary refs log tree commit diff
path: root/src/libstd/process.rs
AgeCommit message (Collapse)AuthorLines
2019-06-27std: Move a process test out of libstdAlex Crichton-27/+0
This commit moves a test out of libstd which is causing deadlocks on musl on CI. Looks like the recent update in musl versions brings in some internal updates to musl which makes `setgid` and `setuid` invalid to call after a `fork` in a multithreaded program. The issue seen here is that the child thread was attempting to grab a lock held by a nonexistent thread, meaning that the child process simply deadlocked causing the whole test to deadlock. This commit moves the test to its own file with no threads which should work.
2019-06-05Tidy: trailing whitespaceReinier Maas-1/+1
Removed trailing whitespace from documentation of ExitStatus.
2019-06-05Edit docs of ExitStatusReinier Maas-1/+4
The documentation of [`ExitStatus`] are extended to be at the same depth as [`Output`].
2019-05-01doc: Warn about possible zombie apocalypseMichal 'vorner' Vaner-0/+12
Extend the std::process::Child docs with warning about possible zombies. The previous version mentioned that when dropping the Child, the process is not killed. However, the wording gave the impression that such behaviour is fine to do (leaving the reader believe low-level details like reaping zombies of the dead processes is taken over by std somehow; or simply leaving the reader unaware about the problem).
2019-04-27Stabilized vectored IOSteven Fackler-4/+4
This renames `std::io::IoVec` to `std::io::IoSlice` and `std::io::IoVecMut` to `std::io::IoSliceMut`, and stabilizes `std::io::IoSlice`, `std::io::IoSliceMut`, `std::io::Read::read_vectored`, and `std::io::Write::write_vectored`. Closes #58452
2019-04-10std: Add `{read,write}_vectored` for more typesAlex Crichton-1/+15
This commit implements the `{read,write}_vectored` methods on more types in the standard library, namely: * `std::fs::File` * `std::process::ChildStd{in,out,err}` * `std::io::Std{in,out,err}` * `std::io::Std{in,out,err}Lock` * `std::io::Std{in,out,err}Raw` Where supported the OS implementations hook up to native support, otherwise it falls back to the already-defaulted implementation.
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-8/+8
2019-03-25SGX target: fix std unit testsJethro Beekman-1/+1
2019-03-14Don't run test launching `echo` since that doesn't exist on WindowsJohn Kåre Alsaker-1/+1
2019-02-28libstd => 2018Taiki Endo-27/+26
2019-02-25Disable running several Stdio doctestsIvan Petkov-2/+2
* A number of `Stdio` related doc examples include running the "rev" command to illustrate piping commands. The majority of these tests are marked as `no_run` except for two tests which were not * Not running these tests is unlikely to cause any negative impact, and doing so also allows the test suite to pass in environments where the "rev" command is unavailable
2019-02-10libs: doc commentsAlexander Regueiro-7/+7
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-21Move a flaky process test out of libstdAlex Crichton-36/+0
This test ensures that everything in `env::vars()` is inherited but that's not actually true because other tests may add env vars after we spawn the process, causing the test to be flaky! This commit moves the test to a run-pass test where it can execute in isolation. Along the way this removes a lot of the platform specificity of the test, using iteslf to print the environment instead of a foreign process.
2018-11-15Rollup merge of #55901 - euclio:speling, r=petrochenkovPietro Albini-2/+2
fix various typos in doc comments
2018-11-13fix various typos in doc commentsAndy Russell-2/+2
2018-11-13Rollup merge of #55754 - spastorino:fix-process-output-docs, r=alexcrichtonkennytm-3/+6
Avoid converting bytes to UTF-8 strings to print, just pass bytes to stdout/err r? @nikomatsakis
2018-11-10Avoid converting bytes to UTF-8 strings to print, just pass bytes to stdout/errSantiago Pastorino-3/+6
2018-10-24Documents `From` implementations for `Stdio`OCTronics-0/+88
Add a basic summary and an example to From `ChildStdin`, `ChildStdout`, `ChildStderr`, `File` implementations.
2018-08-20document the platform-specific behavior of Command::current_dirJack O'Connor-0/+10
2018-08-11Fix indentHavvy (Ryan Scheel)-1/+1
2018-08-11Show that Command can be reused and remodifiedRyan Scheel-0/+33
The prior documentation did not make it clear this was possible.
2018-07-10Deny bare trait objects in `src/libstd`.ljedrz-2/+2
2018-04-24Rollup merge of #49461 - andreastt:child-kill-exited, r=Mark-Simulacrumkennytm-2/+11
std: Child::kill() returns error if process has already exited This patch makes it clear in std::process::Child::kill()'s API documentation that an error is returned if the child process has already cleanly exited. This is implied by the example, but not called out explicitly.
2018-04-17fixup! std: Child::kill() returns error if process has already exitedAndreas Tolfsen-1/+1
2018-04-08fixup! std: Child::kill() returns error if process has already exitedAndreas Tolfsen-1/+1
2018-04-05std: Inline some Termination-related methodsAlex Crichton-0/+2
These were showing up in tests and in binaries but are trivially optimize-able away, so add `#[inline]` attributes so LLVM has an opportunity to optimize them out.
2018-04-02Fix "since" version for getpid feature.Thayne McCombs-1/+1
It was stabilized right before the beta branch was cut for 1.26.0. See https://github.com/rust-lang/rust/pull/49523#issuecomment-377996315
2018-04-01Stabilize `std::process::id()`Thayne McCombs-2/+1
Fixes #44971
2018-03-29fixup! std: Child::kill() returns error if process has already exitedAndreas Tolfsen-1/+6
2018-03-28fixup! std: Child::kill() returns error if process has already exitedAndreas Tolfsen-1/+4
2018-03-28std: Child::kill() returns error if process has already exitedAndreas Tolfsen-2/+3
This patch makes it clear in std::process::Child::kill()'s API documentation that an error is returned if the child process has already cleanly exited. This is implied by the example, but not called out explicitly.
2018-03-25Minor formatting consistency fix.Alexander Ronald Altman-1/+1
2018-03-21termination_trait: Make error message more helpfulTyler Mandry-2/+3
2018-03-21termination_trait: Put examples in error help, not labelTyler Mandry-1/+1
2018-03-21termination_trait: Add () example to error messageTyler Mandry-1/+1
2018-03-03Move process::ExitCode internals to sysScott McMurray-21/+8
Now begins the saga of fixing compilation errors on other platforms...
2018-02-28Fix linkcheckerScott McMurray-2/+2
2018-02-27Put some thought and documentation effort into process::ExitCodeScott McMurray-24/+52
2018-02-24Restrict the Termination impls to simplify stabilizationScott McMurray-6/+18
Make a minimal commitment for stabilization. More impls are likely in future, but are not necessary at this time.
2018-02-22move Termination trait to std::processNiko Matsakis-0/+67
2018-01-26add test checking that process::Command is SendCorentin Henry-0/+6
2018-01-11Make tests build on CloudABI.Ed Schouten-1/+1
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-04Fix an error in std::process documentationLoïc Damien-2/+2
2017-12-26Rollup merge of #46943 - malbarbo:process-test-busybox, r=alexcrichtonkennytm-1/+1
Fix process test when using busybox mkdir busybox mkdir . returns 0 busybox mkdir ./ returns 1
2017-12-24Capture environment at spawnDiggory Blake-4/+25
2017-12-22Fix process test when using busybox mkdirMarco A L Barbosa-1/+1
busybox mkdir . returns 0 busybox mkdir ./ returns 1
2017-11-22Clarify stdin behavior of `Command::output`.Corey Farwell-2/+4
Fixes #44929.
2017-10-29Auto merge of #45295 - Technius:docs/process, r=steveklabnikbors-11/+72
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