- 05 7月, 2021 3 次提交
-
-
由 Mara Bos 提交于
-
由 Ian Jackson 提交于
There is discussion of this in #40230 which requests clarification. Signed-off-by: NIan Jackson <ijackson@chiark.greenend.org.uk>
-
由 Ian Jackson 提交于
In the docs for intrinsics::abort(): * Strengthen the recommendation by to use process::abort instead. * Document the fact that it (ab)uses an LLVM debug trap and what the likely consequences are. * State that the precise behaviour is unstable. In the docs for process::abort(): * Promise that we have the same behaviour as C `abort()`. * Document the likely consequences, including, specifically, the consequences on Unix. In the internal comment for unix::abort_internal: * Refer to the public docs for the public API functions. * Correct and expand the description of libc::abort. Specifically: * Do not claim that abort() unregisters signal handlers. It doesn't; it honours the SIGABRT handler. * Discuss, extensively, the issue with abort() flushing stdio buffers. * Describe the glibc behaviour in some detail. Co-authored-by: NMark Wooding <mdw@distorted.org.uk> Signed-off-by: NIan Jackson <ijackson@chiark.greenend.org.uk>
-
- 02 7月, 2021 1 次提交
-
-
由 Konrad Borowski 提交于
Now that arrays implement `IntoIterator`, using `&` is no longer necessary. This makes examples easier to understand.
-
- 26 6月, 2021 1 次提交
-
-
由 Eric Huss 提交于
-
- 15 6月, 2021 1 次提交
-
-
由 Mara Bos 提交于
-
- 12 5月, 2021 5 次提交
-
-
由 Ian Jackson 提交于
Signed-off-by: NIan Jackson <ijackson@chiark.greenend.org.uk>
-
由 Ian Jackson 提交于
Co-authored-by: NJane Lusby <jlusby@yaah.dev>
-
由 Ian Jackson 提交于
Co-authored-by: NJosh Triplett <josh@joshtriplett.org>
-
由 Ian Jackson 提交于
It is unergnomic to have to say things like bad.into_status().signal() Implementing `ExitStatusExt` for `ExitStatusError` fixes this. Unfortunately it does mean making a previously-infallible method capable of panicing, although of course the existing impl remains infallible. The alternative would be a whole new `ExitStatusErrorExt` trait. `<ExitStatus as ExitStatusExt>::into_raw()` is not particularly ergonomic to call because of the often-required type annotation. See for example the code in the test case in library/std/src/sys/unix/process/process_unix/tests.rs Perhaps we should provide equivalent free functions for `ExitStatus` and `ExitStatusExt` in std::os::unix::process and maybe deprecate this trait method. But I think that is for the future. Signed-off-by: NIan Jackson <ijackson@chiark.greenend.org.uk>
-
由 Ian Jackson 提交于
Closes #73125 This is in pursuance of Issue #73127 Consider adding #[must_use] to std::process::ExitStatus In MR #81452 Add #[must_use] to [...] process::ExitStatus we concluded that the existing arrangements in are too awkward so adding that #[must_use] is blocked on improving the ergonomics. I wrote a mini-RFC-style discusion of the approach in https://github.com/rust-lang/rust/issues/73125#issuecomment-771092741Signed-off-by: NIan Jackson <ijackson@chiark.greenend.org.uk>
-
- 22 4月, 2021 1 次提交
-
-
由 Christiaan Dirkx 提交于
-
- 21 4月, 2021 1 次提交
-
-
由 Christiaan Dirkx 提交于
-
- 27 3月, 2021 1 次提交
-
-
由 Mara Bos 提交于
-
- 10 3月, 2021 1 次提交
-
-
由 Kornel 提交于
It's possible to create a deadlock with stdin/stdout I/O on a single thread: * the child process may fill its stdout buffer, and have to wait for the parent process to read it, * but the parent process may be waiting until its stdin write finishes before reading the stdout. Therefore, the parent process should use separate threads for writing and reading.
-
- 23 2月, 2021 1 次提交
-
-
由 Ian Jackson 提交于
The use of `ExitStatus` as the Rust type name for a Unix *wait status*, not an *exit status*, is very confusing, but sadly probably too late to change. This area is confusing enough in Unix already (and many programmers are already confuxed). We can at least document it. I chose *not* to mention the way shells like to exit with signal numbers, thus turning signal numbers into exit statuses. This is only relevant for Rust programs using `std::process` if they run shells. Signed-off-by: NIan Jackson <ijackson@chiark.greenend.org.uk>
-
- 11 2月, 2021 1 次提交
-
-
由 Amanieu d'Antras 提交于
-
- 23 11月, 2020 1 次提交
-
-
由 Lzu Tao 提交于
-
- 19 11月, 2020 1 次提交
-
-
由 Benoît du Garreau 提交于
-
- 01 11月, 2020 1 次提交
-
-
由 Matyáš Racek 提交于
Co-authored-by: NMara Bos <m-ou.se@m-ou.se>
-
- 31 10月, 2020 1 次提交
-
-
由 Matyáš Racek 提交于
-
- 19 10月, 2020 1 次提交
-
-
由 pierwill 提交于
-
- 27 9月, 2020 1 次提交
-
-
由 Eric Huss 提交于
-
- 21 9月, 2020 1 次提交
-
-
由 Federico Ponzi 提交于
Co-authored-by: NDavid Tolnay <dtolnay@gmail.com>
-
- 11 9月, 2020 1 次提交
-
-
由 Federico Ponzi 提交于
-
- 03 9月, 2020 1 次提交
-
-
由 Federico Ponzi 提交于
Fixes #73836
-
- 31 8月, 2020 1 次提交
-
-
由 Lzu Tao 提交于
Also doing fmt inplace as requested.
-
- 24 8月, 2020 1 次提交
-
-
由 JR Heard 提交于
-
- 14 8月, 2020 1 次提交
-
-
由 Jonas Berlin 提交于
As a relative beginner, it took a while for me to figure out I could just steal the references to avoid partially moving the child and thus retain ability to call functions on it (and store it in structs etc).
-
- 12 8月, 2020 2 次提交
- 11 8月, 2020 1 次提交
-
-
由 Marcel Hellwig 提交于
-
- 28 7月, 2020 1 次提交
-
-
由 mark 提交于
-
- 23 5月, 2020 1 次提交
-
-
由 LeSeulArtichaut 提交于
-
- 18 5月, 2020 1 次提交
-
-
由 Ralf Jung 提交于
-
- 26 4月, 2020 2 次提交
-
-
由 Steven Fackler 提交于
-
由 Steven Fackler 提交于
When working with an arbitrary reader or writer, code that uses vectored operations may end up being slower than code that copies into a single buffer when the underlying reader or writer doesn't actually support vectored operations. These new methods allow you to ask the reader or witer up front if vectored operations are efficiently supported. Currently, you have to use some heuristics to guess by e.g. checking if the read or write only accessed the first buffer. Hyper is one concrete example of a library that has to do this dynamically: https://github.com/hyperium/hyper/blob/0eaf304644a396895a4ce1f0146e596640bb666a/src/proto/h1/io.rs#L582-L594
-
- 30 11月, 2019 1 次提交
-
-
由 David Tolnay 提交于
This commit applies rustfmt with rust-lang/rust's default settings to files in src/libstd *that are not involved in any currently open PR* to minimize merge conflicts. THe list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in outstanding_files, the relevant commands were: $ find src/libstd -name '*.rs' \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ rg libstd outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libstd. To confirm no funny business: $ git checkout $THIS_COMMIT^ $ git show --pretty= --name-only $THIS_COMMIT \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ git diff $THIS_COMMIT # there should be no difference
-
- 07 11月, 2019 1 次提交
-
-
由 Umesh Kalappa 提交于
-
- 21 10月, 2019 1 次提交
-
-
由 Mikko Rantanen 提交于
-