about summary refs log tree commit diff
path: root/src/libstd/sys/unix/ext
AgeCommit message (Collapse)AuthorLines
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
2017-11-07Add missing links and examplesGuillaume Gomez-4/+70
2017-11-07Rollup merge of #45470 - GuillaumeGomez:unix-metadata-ext, r=QuietMisdreavuskennytm-0/+246
add missing docs for MetadataExt r? @rust-lang/docs
2017-10-31add missing docs for MetadataExtGuillaume Gomez-0/+246
2017-10-31Update doc comment for the Unix extension moduleTobias Bucher-2/+8
It was a bit outdated, claimed to be able to do less than it actually could.
2017-09-17Remove st_mode maskTrevor Merrifield-2/+2
2017-09-15Retain suid/sgid/sticky bits in Metadata.permissionsTrevor Merrifield-2/+2
Most users would expect set_permissions(Metadata.permissions()) to be non-destructive. While we can't guarantee this, we can at least pass the needed info to chmod. Also update the PermissionsExt documentation to disambiguate what it contains, and to refer to the underlying value as `st_mode` rather than its type `mode_t`. Closes #44147
2017-08-27Move unused-extern-crate to late passTatsuyuki Ishi-2/+0
2017-08-24Fix inconsistent doc headingslukaramu-1/+1
This fixes headings reading "Unsafety" and "Example", they should be "Safety" and "Examples" according to RFC 1574.
2017-08-16Refactoring: move net specific fd imps to netTobias Schaffner-59/+62
Move the implementations of net specific file descriptior implementations to net. This makes it easier to exclude net at all if not needed for a target.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2017-08-13Rollup merge of #43814 - Eijebong:fix_typos2, r=petrochenkovGuillaume Gomez-4/+4
Fix some typos Follow up of #43794 If refined my script a little bit and found some more.
2017-08-13Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichtonbors-0/+12
Expose all OS-specific modules in libstd doc. 1. Uses the special `--cfg dox` configuration passed by rustbuild when running `rustdoc`. Changes the `#[cfg(platform)]` into `#[cfg(any(dox, platform))]` so that platform-specific API are visible to rustdoc. 2. Since platform-specific implementations often won't compile correctly on other platforms, `rustdoc` is changed to apply `everybody_loops` to the functions during documentation and doc-test harness. 3. Since platform-specific code are documented on all platforms now, it could confuse users who found a useful API but is non-portable. Also, their examples will be doc-tested, so must be excluded when not testing on the native platform. An undocumented attribute `#[doc(cfg(...))]` is introduced to serve the above purposed. Fixes #24658 (Does _not_ fully implement #1998).
2017-08-12Fix some typosBastien Orivel-4/+4
2017-08-12Fix error during cross-platform documentation.kennytm-0/+11
2017-08-10Fix typo corersponding -> correspondingFoucher-1/+1
2017-08-10Exposed all platform-specific documentation.kennytm-0/+1
2017-07-25Correct 'stable' attributeIan Douglas Scott-3/+3
2017-07-24Implement AsRawFd for Stdin, Stdout, and StderrIan Douglas Scott-0/+17
2017-06-23Removed as many "```ignore" as possible.kennytm-6/+16
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-20Add `Read::initializer`.Steven Fackler-5/+7
This is an API that allows types to indicate that they can be passed buffers of uninitialized memory which can improve performance.
2017-04-03Revert "Implement AsRawFd/IntoRawFd for RawFd"Cody P Schafer-15/+0
This reverts commit 2cf686f2cdd6446a3cd47df0305ead40fabe85df (#40842) RawFd is a type alias for c_int, which is itself a type alias for i32. As a result, adding AsRawFd and IntoRawFd impls for RawFd actually adds them for i32. As a result, the reverted commit makes this valid: ``` use std::os::unix::io::AsRawFd; fn arf<T: AsRawFd>(_: T) {} fn main() { arf(32i32) } ``` Implimenting AsRawFd and IntoRawFd for i32 breaks the promises of both those traits that their methods return a valid RawFd. r? @aturon cc @Mic92 @kamalmarhubi
2017-03-31Rollup merge of #40842 - Mic92:RawFd, r=aturonCorey Farwell-0/+15
Implement AsRawFd/IntoRawFd for RawFd This is useful to build os abstraction like the nix crate does. It allows to define functions, which accepts generic arguments of data structures convertible to RawFd, including RawFd itself. For example: ``` fn write<FD: AsRawFd>(fd: FD, buf: &[u8]) -> Result<usize> write(file, buf); ``` instead of: ``` fn write(fd: RawFd, buf: &[u8]) -> Result<usize> write(file.as_raw_fd(), buf); ``` cc @kamalmarhubi