about summary refs log tree commit diff
path: root/src/libstd/sys
AgeCommit message (Collapse)AuthorLines
2016-12-09Auto merge of #38197 - mneumann:dragonfly-fixes-2016-12-06, r=alexcrichtonbors-7/+2
Fix current_exe() on DragonFly (again) This is a follow up on [this pull request][1]. Since DragonFly 4.6.1 ([this commit][2]), the ```kern.proc.pathname``` sysctl works correctly, i.e. it does not return paths including a ```:``` (see [here][3]). Use it and don't try to fix old versions of DragonFly! There are not many DragonFly installations out there that we can't control and no one is compiling Rust from source. If someone wants to run Rust on a pre-4.6.1 DragonFly system, the ports system should provide a patch. [1]: https://github.com/rust-lang/rust/pull/35494 [2]: https://gitweb.dragonflybsd.org/dragonfly.git/commit/726f7ca07e193db73635e9c4e24e40c96087d6d9 [3]: https://gist.github.com/mneumann/a2f6b6a0a03935b561d6185872a4b222
2016-12-08Auto merge of #38146 - kali:master, r=alexcrichtonbors-2/+15
fix objc ABI in std::env::args iOS use different calling convention for `objc_msgSend` depending on the platform. armv7 expect good old variadic arguments, but aarch64 wants "normal" convention: `objc_msgSend` has to be called mimicking the actual callee prototype. https://developer.apple.com/library/content/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW26 This currently breaks std::env:args() on aarch64 iOS devices. As far as I can tell, in the standard library, this is the only occurrence of ObjectiveC dispatching.
2016-12-07Rollup merge of #38153 - GuillaumeGomez:typo, r=blussGuillaume Gomez-1/+1
Fix small typo
2016-12-06Fix current_exe() on DragonFly (again)Michael Neumann-7/+2
This is a follow up on [this pull request][1]. Since DragonFly 4.6.1 ([this commit][2]), the "kern.proc.pathname" sysctl works correctly, i.e. it does not return paths including a ":" (see [here][3]). Use it and don't try to fix old versions of DragonFly! There are not many DragonFly installations out there that we can't control and no one is compiling Rust from source. If someone wants to run Rust on a pre-4.6.1 DragonFly system, the ports system should provide a patch. [1]: https://github.com/rust-lang/rust/pull/35494 [2]: https://gitweb.dragonflybsd.org/dragonfly.git/commit/726f7ca07e193db73635e9c4e24e40c96087d6d9 [3]: https://gist.github.com/mneumann/a2f6b6a0a03935b561d6185872a4b222
2016-12-05Auto merge of #38098 - luser:windows-commandext, r=alexcrichtonbors-2/+26
Add std::os::windows::process::CommandExt. Fixes #37827 This adds a CommandExt trait for Windows along with an implementation of it for std::process::Command with methods to set the process creation flags that are passed to CreateProcess.
2016-12-04Fix small typoGuillaume Gomez-1/+1
2016-12-03fix objc ABI in std::env::argsMathieu Poumeyrol-2/+15
2016-12-02Auto merge of #37936 - tedsta:fuchsia_std_process, r=alexcrichtonbors-238/+687
Fuchsia support for std::process via liblaunchpad. Now we can launch processes on Fuchsia via the Rust standard library! ... Mostly. Right now, ~5% of the time, reading the stdout/stderr off the pipes will fail. Some Magenta kernel people think it's probably a bug in Magenta's pipes. I wrote a unit test that demonstrates the issue in C, which I was told will expedite a fix. https://fuchsia-review.googlesource.com/#/c/15628/ Hopefully this can get merged once the issue is fixed :) @raphlinus
2016-12-01std::process fuchsia support cleanupTheodore DeRego-34/+26
2016-11-30just add one method named creation_flags, fix the tidy errorTed Mielczarek-17/+4
2016-11-30Add std::os::windows::process::CommandExt, with set_creation_flags and ↵Ted Mielczarek-2/+39
add_creation_flags methods. Fixes #37827 This adds a CommandExt trait for Windows along with an implementation of it for std::process::Command with methods to set the process creation flags that are passed to CreateProcess.
2016-11-30Removed Option<ExitStatus> member from fuchsia Process struct. Destroy ↵Theodore DeRego-32/+45
launchpads and close handles in Drop impls rather than manually
2016-11-23Separated fuchsia-specific process stuff into 'process_fuchsia.rs' and ↵Theodore DeRego-868/+940
refactored out some now-duplicated code into a 'process_common.rs'
2016-11-22Cleaned up and appeased the linterTheodore DeRego-66/+28
2016-11-22Fuchsia support for std::process via liblaunchpad.Theodore DeRego-3/+413
2016-11-22Add a method for setting permissions directly on an open file.Steven Allen-0/+32
On unix like systems, the underlying file corresponding to any given path may change at any time. This function makes it possible to set the permissions of the a file corresponding to a `File` object even if its path changes.
2016-11-21Auto merge of #37677 - jsen-:master, r=alexcrichtonbors-8/+26
libstd: support creation of anonymous pipe on WinXP/2K3 `PIPE_REJECT_REMOTE_CLIENTS` flag is not supported on Windows < VISTA, and every invocation of `anon_pipe` including attempts to pipe `std::process::Child`'s stdio fails. This PR should work around this issue by performing a runtime check of windows version and conditionally omitting this flag on "XP and friends". Getting the version should be probably moved out of the function `anon_pipe` itself (the OS version does not often change during runtime :) ), but: - I didn't find any precedent for this and assuming there's not much overhead (I hope windows does not perform any heuristics to find out it's own version, just fills couple of fields in the struct). - the code path is not especially performance sensitive anyway.
2016-11-20support creation of anonymous pipe on WinXP/2K3jsen--8/+26
2016-11-10doc: fix typosTshepang Lekhonkhobe-1/+1
2016-11-04std: Track change to cprng syscall signature (Fuchsia)Raph Levien-8/+20
The mx_cprng_draw syscall has changed signature to separate the status and size return values, rather than multiplexing them into a single value with errors interpreted as a negative value. This patch tracks that change.
2016-11-01Document sys_common and sysBrian Anderson-0/+22
2016-11-01std: Move sys_common to libstd/sys_commonBrian Anderson-3928/+0
Make the directory structure reflect the module structure. I've always found the existing structure confusing.
2016-11-01std: Move platform-specific out of sys_common::utilBrian Anderson-27/+26
2016-11-01std: Move platform-specific code out of libstd/lib.rsBrian Anderson-3/+22
2016-11-01std: Move a plattform-specific constant to sys::stdioBrian Anderson-0/+8
2016-11-01std: Move elf TLS to sys::fast_thread_localBrian Anderson-0/+168
2016-10-28Auto merge of #37385 - raphlinus:fuchsia_random, r=alexcrichtonbors-1/+53
Add support for kernel randomness for Fuchsia Wire up cprng syscall as provider for rand::os::OsRng on Fuchsia.
2016-10-24Add support for kernel randomness for FuchsiaRaph Levien-1/+53
Wire up cprng syscall as provider for rand::os::OsRng on Fuchsia.
2016-10-22Fix tidy warningRaph Levien-1/+1
Prefer FIXME to TODO
2016-10-22Fix missing DirEntryExt::inoRaph Levien-2/+2
The DirEntryExt::ino() implementation was omitted from the first iteration of this patch, because a dependency needed to be configured. The fix is straightforward enough.
2016-10-22Add Fuchsia supportRaph Levien-5/+30
Adds support for the x86_64-unknown-fuchsia target, which covers the Fuchsia operating system.
2016-10-16impl Debug for ReadDirDavid Henningsson-0/+16
It is good practice to implement Debug for public types, and indicating what directory you're reading seems useful. Signed-off-by: David Henningsson <diwic@ubuntu.com>
2016-10-14Auto merge of #35704 - tbu-:pr_pread_pwrite, r=alexcrichtonbors-7/+250
Implement `read_offset` and `write_offset` These functions allow to read from and write to a file from multiple threads without changing the per-file cursor, avoiding the race between the seek and the read.
2016-10-14Android: Fix unused-imports warningTobias Bucher-1/+2
2016-10-14Only use Android fallback for {ftruncate,pread,pwrite} on 32 bitTobias Bucher-0/+24
2016-10-12Rollup merge of #36995 - nrc:stable, r=@nikomatsakisAlex Crichton-3/+2
stabilise ?, attributes on stmts, deprecate Reflect r? @nikomatsakis
2016-10-12Remove unnecessary `unsafe` blockTobias Bucher-20/+16
2016-10-12Deprecate `Reflect`Nick Cameron-3/+2
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
2016-10-11Fix Android compilation `io::Error` -> `io::ErrorKind`Tobias Bucher-2/+2
2016-10-09use MSG_NOSIGNAL on all relevant platformsMathieu Poumeyrol-6/+18
2016-10-09Use `try_into` and move some functionsTobias Bucher-29/+37
2016-10-09Dynamically detect presence of `p{read,write}64` on AndroidTobias Bucher-23/+68
2016-10-09Implement reading and writing atomically at certain offsetsTobias Bucher-1/+170
These functions allow to read from and write to a file in one atomic action from multiple threads, avoiding the race between the seek and the read. The functions are named `{read,write}_at` on non-Windows (which don't change the file cursor), and `seek_{read,write}` on Windows (which change the file cursor).
2016-10-08Use less `size_t` casts in libstd since it's now defined as `usize`Tobias Bucher-37/+31
2016-10-06Rollup merge of #36965 - kallisti5:master, r=alexcrichtonJonathan Turner-1/+1
Haiku: Fix IPv6 target_os check
2016-10-05Auto merge of #36944 - brson:modos, r=alexcrichtonbors-3/+3
Fix mod declarations on untested platforms r? @alexcrichton
2016-10-04Haiku: Fix IPv6 target_os checkAlexander von Gluck IV-1/+1
2016-10-04Rollup merge of #36902 - ollie27:stab_impls, r=alexcrichtonManish Goregaokar-8/+8
std: Correct stability attributes for some implementations These are displayed by rustdoc so should be correct.
2016-10-03Fix mod declarations on untested platformsBrian Anderson-3/+3
2016-10-02Move platform-specific arg handling to sys::argsBrian Anderson-278/+290