summary refs log tree commit diff
path: root/src/libstd/sys/unix/ext
AgeCommit message (Collapse)AuthorLines
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
2017-03-26Implement AsRawFd/IntoRawFd for RawFdJörg Thalheim-0/+15
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> instead of: fn write(fd: RawFd, buf: &[u8]) -> Result<usize> write(foo.as_raw_fd(), buf);
2017-03-25Fix libc::bind call on aarch64-linux-androidMarco A L Barbosa-2/+2
2017-03-17Rollup merge of #40457 - frewsxcv:frewsxcv-macos, r=steveklabnikCorey Farwell-1/+1
Update usages of 'OSX' (and other old names) to 'macOS'. As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
2017-03-13Remove function invokation parens from documentation links.Corey Farwell-17/+17
This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-03-12Update usages of 'OSX' (and other old names) to 'macOS'.Corey Farwell-1/+1
As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
2017-02-05Rollup merge of #38518 - nagisa:exec-doc, r=alexcrichtonCorey Farwell-0/+10
Expand documentation of process::exit and exec Show a conventional way to use process::exit when destructors are considered important and also mention that the same caveats wrt destructors apply to exec as well.
2017-01-22libstd: replace all `try!` with `?` in documentation examplesUtkarsh Kukreti-5/+5
See #38644.
2017-01-19Expand documentation of process::exit and execSimonas Kazlauskas-0/+10
Show a conventional way to use process::exit when destructors are considered important and also mention that the same caveats wrt destructors apply to exec as well.
2017-01-14Add doc examples & description in `std::os::unix::ffi`.Corey Farwell-3/+57
2016-12-20Fix compile errors and suchAlex Crichton-4/+3
2016-12-20Rollup merge of #38236 - GuillaumeGomez:unix_socket_doc, r=frewsxcvAlex Crichton-26/+566
Unix socket doc r? @frewsxcv
2016-12-16Add missing doc examples for UnixDatagramGuillaume Gomez-38/+285
2016-12-15Stabilize std::os::unix::process::CommandExt::before_execAaron Turon-1/+1
2016-12-15Stabilize std::os::*::fs::FileExtAaron Turon-5/+5
2016-12-08Add Incoming doc examplesGuillaume Gomez-3/+30
2016-12-08Add UnixListener doc examplesGuillaume Gomez-10/+101
2016-12-08Add doc examples for UnixStreamGuillaume Gomez-6/+145