about summary refs log tree commit diff
path: root/src/libstd/sys/unix/ext
AgeCommit message (Collapse)AuthorLines
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-5/+5
2019-03-29implement `AsRawFd` for stdio locksAndy Russell-0/+15
2019-03-21Unify OsString/OsStr for byte-based implementationsJethro Beekman-104/+33
2019-02-28libstd => 2018Taiki Endo-47/+45
2019-02-26Auto merge of #58357 - sfackler:vectored-io, r=alexcrichtonbors-1/+36
Add vectored read and write support This functionality has lived for a while in the tokio ecosystem, where it can improve performance by minimizing copies. r? @alexcrichton
2019-02-22Rollup merge of #58059 - RalfJung:before_exec, r=alexcrichtonMazdak Farrokhzad-4/+24
deprecate before_exec in favor of unsafe pre_exec Fixes https://github.com/rust-lang/rust/issues/39575 As per the [lang team decision](https://github.com/rust-lang/rust/issues/39575#issuecomment-442993358): > The language team agreed that before_exec should be unsafe, and leaves the details of a transition plan to the libs team. Cc @alexcrichton @rust-lang/libs how would you like to proceed?
2019-02-13Add vectored read and write supportSteven Fackler-1/+36
This functionality has lived for a while in the tokio ecosystem, where it can improve performance by minimizing copies.
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-12/+12
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-11remove "experimental" wording from std::os::unixAndy Russell-1/+1
2019-02-10libs: doc commentsAlexander Regueiro-10/+10
2019-02-10tests: doc commentsAlexander Regueiro-2/+2
2019-02-03POSIX requires async signal safety for fork in signal handlers, not in generalRalf Jung-2/+1
2019-02-02pre_exec: expand docsRalf Jung-3/+4
2019-02-02deprecate things a bit slowerRalf Jung-1/+1
2019-02-01also replace before_exec by pre_exec on redoxRalf Jung-1/+1
2019-02-01deprecate before_exec in favor of unsafe pre_execRalf Jung-3/+23
2019-01-15Stabilize FileExt::read_exact_at/write_all_atDror Levin-4/+2
Closes #51984.
2018-12-25Remove licensesMark Rousskov-80/+0
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-1/+1
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-30Deal with EINTR in net timeout testsJosh Stone-4/+6
We've seen sporadic QE failures in the timeout tests on this assertion: assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut); So there's an error, but not either of the expected kinds. Adding a format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`). For the cases that were using `read`, we can just use `read_exact` to keep trying after interruption. For those using `recv_from`, we have to manually loop until we get a non-interrupted result.
2018-11-22Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearerariasuni-6/+12
2018-07-11Auto merge of #51553 - jD91mZM2:uds, r=sfacklerbors-0/+6
Unix sockets on redox This is done using the ipcd daemon. It's not exactly like unix sockets because there is not actually a physical file for the path, but it's close enough for a basic implementation :) This allows mio-uds and tokio-uds to work with a few modifications as well, which is exciting!
2018-07-08Delete leftover filesjD91mZM2-354/+0
2018-07-07Revert unification of interfacesjD91mZM2-25/+847
2018-07-03Remove stability attributes on private types and leftover docsjD91mZM2-16/+0
2018-07-02Fill in tracking issue number for read_exact_at/write_all_atDror Levin-2/+2
2018-06-27Add is_unnamed on redoxjD91mZM2-2/+4
2018-06-27Fix tidy checksjD91mZM2-5/+9
2018-06-27Horrible attempt at cleaning things up that probably just made it worsejD91mZM2-847/+389
2018-06-26Mention redox' behavior in doc commentsjD91mZM2-0/+6
2018-06-26Add read_exact_at and write_all_at methods to FileExt on unixDror Levin-0/+127
2018-06-15Fix issue on unixGuillaume Gomez-0/+1
2018-04-24Auto merge of #50079 - NickAtAccuPS:android_abstract_socket, r=sfacklerbors-1/+4
Android abstract unix domain sockets AddressKind correction The prior check causes abstract unix domain sockets to return AddressKind::Unnamed instead of AddressKind::Abstract on Android. Other than the immediately proceeding comment "macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses" the check as-implemented does not seem to have alternative explanation. I couldn't find an alternative explanation while stepping though git blame. I suspect the AddressKind::Unnamed nonzero check should instead be if macos, length 16, and zeroed array. @sfackler could you comment on this, the code as-is is the same from your initial addition of abstract uds support.
2018-04-19Rustfmt result (for relevant changes) to satisfy Travis line length check.Nicholas Rishel-1/+4
Signed-off-by: Nicholas Rishel <nick@accups.com>
2018-04-19The prior check causes abstract unix domain sockets to return unnamed on ↵Nicholas Rishel-1/+1
Android. Signed-off-by: Nicholas Rishel <nick@accups.com>
2018-04-14Prefer unprefixed paths for well known structsDylan MacKenzie-8/+8
2018-04-14Add doc links to `std::os` extension traitsDylan MacKenzie-19/+34
Add documentation links to the original type for various OS-specific extension traits and normalize the language for introducing such traits. Also, remove some outdated comments around the extension trait definitions.
2018-04-03Stabilize parent_id()Thayne McCombs-1/+1
Fixes #46104
2018-03-28Auto merge of #49357 - frewsxcv:frewsxcv-termination-doc-examples, ↵bors-171/+171
r=GuillaumeGomez Remove hidden `foo` functions from doc examples; use `Termination` trait. Fixes https://github.com/rust-lang/rust/issues/49233. Easier to review with the white-space ignoring `?w=1` feature: https://github.com/rust-lang/rust/pull/49357/files?w=1
2018-03-28Remove hidden `foo` functions from doc examples; use `Termination` trait.Corey Farwell-171/+171
Fixes https://github.com/rust-lang/rust/issues/49233.
2018-03-23Reduce scope of unsafe block in sun_path_offsetDaniel Kolsoi-7/+5
2018-03-02Rollup merge of #48328 - frewsxcv:frewsxcv-clarify-error-zero-duration, ↵Manish Goregaokar-6/+65
r=sfackler Fixes #47311. r? @nrc
2018-02-25Rollup merge of #48330 - frewsxcv:frewsxcv-tests-zero-duration, r=sfacklerkennytm-1/+40
Add tests ensuring zero-Duration timeouts result in errors; fix Redox issues. Part of #48311
2018-02-24Clarify "It is an error to..." wording for zero-duration behaviors.Corey Farwell-6/+65
Documentation fix side of https://github.com/rust-lang/rust/issues/48311.
2018-02-18Add tests ensuring zero-Duration timeouts result in errors.Corey Farwell-1/+40
Part of https://github.com/rust-lang/rust/issues/48311
2018-02-17Fix broken documentation link.Corey Farwell-1/+1
2017-11-19Add process::parent_idSteven Fackler-0/+6
I have this as a Unix-only API since it seems like Windows doesn't have a similar API.
2017-11-11Add missing links and examples for FileExtGuillaume Gomez-2/+40
2017-11-08Rollup merge of #45582 - GuillaumeGomez:doc-unix-missing-links, r=frewsxcvGuillaume Gomez-4/+70
Add missing links and examples r? @rust-lang/docs