about summary refs log tree commit diff
path: root/src/libstd/sys/redox
AgeCommit message (Collapse)AuthorLines
2017-06-23Rollup merge of #42783 - ids1024:redox-env, r=sfacklerMark Simulacrum-1/+1
Redox: Use create() instead of open() when setting env variable See https://github.com/redox-os/kernel/pull/25.
2017-06-23Removed as many "```ignore" as possible.kennytm-21/+31
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-22Fix Redox build, broken in ecbb896b9eb2acadefde57be493e4298c1aa04a3Ian Douglas Scott-3/+2
2017-06-22Auto merge of #42798 - stepancheg:args-debug, r=sfacklerbors-0/+6
Better Debug for Args and ArgsOs Display actual args instead of two dots.
2017-06-21Better Debug for Args and ArgsOsStepan Koltsov-0/+6
Display actual args instead of two dots.
2017-06-20Add `Read::initializer`.Steven Fackler-24/+0
This is an API that allows types to indicate that they can be passed buffers of uninitialized memory which can improve performance.
2017-06-20Redox: Use create() instead of open() when setting env variableIan Douglas Scott-1/+1
2017-06-15Avoid allocations in Debug for os_strStepan Koltsov-7/+20
Fixes #38879
2017-06-06Add conversions from File and Child* handles to StdioJosh Stone-0/+12
`Stdio` now implements `From<ChildStdin>`, `From<ChildStdout>`, `From<ChildStderr>`, and `From<File>`. The `Command::stdin`/`stdout`/`stderr` methods now take any type that implements `Into<Stdio>`. This makes it much easier to write shell-like command chains, piping to one another and redirecting to and from files. Otherwise one would need to use the unsafe and OS-specific `from_raw_fd` or `from_raw_handle`.
2017-06-02Switch to repr(C) for syscall structsJeremy Soller-3/+3
2017-05-21Implement requires_synchronized_create() for RedoxIan Douglas Scott-0/+5
This was breaking the libstd build for Redox.
2017-05-20migrate everything to using mem::needs_dropAlexis Beingessner-3/+4
2017-04-16Fix stdio descriptors in exec by removing cloexec if present. Use dup2 ↵Jeremy Soller-9/+18
instead of dup
2017-03-17Rollup merge of #40457 - frewsxcv:frewsxcv-macos, r=steveklabnikCorey Farwell-4/+4
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-15Auto merge of #40009 - clarcharr:box_to_buf, r=alexcrichtonbors-0/+6
Leftovers from #39594; From<Box> impls These are a few more impls that follow the same reasoning as those from #39594. What's included: * `From<Box<str>> for String` * `From<Box<[T]>> for Vec<T>` * `From<Box<CStr>> for CString` * `From<Box<OsStr>> for OsString` * `From<Box<Path>> for PathBuf` * `Into<Box<str>> for String` * `Into<Box<[T]>> for Vec<T>` * `Into<Box<CStr>> for CString` * `Into<Box<OsStr>> for OsString` * `Into<Box<Path>> for PathBuf` * `<Box<CStr>>::into_c_string` * `<Box<OsStr>>::into_os_string` * `<Box<Path>>::into_path_buf` * Tracking issue for latter three methods + three from previous PR. Currently, the opposite direction isn't doable with `From` (only `Into`) because of the separation between `liballoc` and `libcollections`. I'm holding off on those for a later PR.
2017-03-12Update usages of 'OSX' (and other old names) to 'macOS'.Corey Farwell-4/+4
As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
2017-03-10Add From<Box<..>> implementations.Clar Charr-0/+6
2017-03-10OsString::shrink_to_fit.Clar Charr-0/+5
2017-02-27Auto merge of #38165 - Yamakaky:better-backtrace, r=petrochenkovbors-3/+8
Improve backtrace formating while panicking. Fixes #37783. Done: - Fix alignment of file paths for better readability - `RUST_BACKTRACE=full` prints all the informations (current behaviour) - `RUST_BACKTRACE=(short|yes)` is the default and does: - Skip irrelevant frames at the beginning and the end - Remove function address - Remove the current directory from the absolute paths - Remove `::hfabe6541873` at the end of the symbols - `RUST_BACKTRACE=(0|no)` disables the backtrace. - `RUST_BACKTRACE=<everything else>` is equivalent to `short` for backward compatibility. - doc - More uniform printing across platforms. Removed, TODO in a new PR: - Remove path prefix for libraries and libstd Example of short backtrace: ```rust fn fail() { panic!(); } fn main() { let closure = || fail(); closure(); } ``` Short: ``` thread 'main' panicked at 'explicit panic', t.rs:2 Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. stack backtrace: 0: t::fail at ./t.rs:2 1: t::main::{{closure}} at ./t.rs:6 2: t::main at ./t.rs:7 ``` Full: ``` thread 'main' panicked at 'This function never returns!', t.rs:2 stack backtrace: 0: 0x558ddf666478 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::hec84c9dd8389cc5d at /home/yamakaky/dev/rust/rust/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: 0x558ddf65d90e - std::sys_common::backtrace::_print::hfa25f8b31f4b4353 at /home/yamakaky/dev/rust/rust/src/libstd/sys_common/backtrace.rs:71 2: 0x558ddf65cb5e - std::sys_common::backtrace::print::h9b711e11ac3ba805 at /home/yamakaky/dev/rust/rust/src/libstd/sys_common/backtrace.rs:60 3: 0x558ddf66796e - std::panicking::default_hook::{{closure}}::h736d216e74748044 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:355 4: 0x558ddf66743c - std::panicking::default_hook::h16baff397e46ea10 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:371 5: 0x558ddf6682bc - std::panicking::rust_panic_with_hook::h6d5a9bb4eca42c80 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:559 6: 0x558ddf64ea93 - std::panicking::begin_panic::h17dc549df2f10b99 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:521 7: 0x558ddf64ec42 - t::diverges::he6bc43fc925905f5 at /tmp/p/t.rs:2 8: 0x558ddf64ec5a - t::main::h0ffc20356b8a69c0 at /tmp/p/t.rs:6 9: 0x558ddf6687f5 - core::ops::FnOnce::call_once::hce41f19c0db56f93 10: 0x558ddf667cde - std::panicking::try::do_call::hd4c8c97efb4291df at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:464 11: 0x558ddf698d77 - __rust_try 12: 0x558ddf698c57 - __rust_maybe_catch_panic at /home/yamakaky/dev/rust/rust/src/libpanic_unwind/lib.rs:98 13: 0x558ddf667adb - std::panicking::try::h2c56ed2a59ec1d12 at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:440 14: 0x558ddf66cc9a - std::panic::catch_unwind::h390834e0251cc9af at /home/yamakaky/dev/rust/rust/src/libstd/panic.rs:361 15: 0x558ddf6809ee - std::rt::lang_start::hb73087428e233982 at /home/yamakaky/dev/rust/rust/src/libstd/rt.rs:57 16: 0x558ddf64ec92 - main 17: 0x7fecb869e290 - __libc_start_main 18: 0x558ddf64e8b9 - _start 19: 0x0 - <unknown> ```
2017-02-25Rollup merge of #39961 - redox-os:redox, r=alexcrichtonEduard-Mihai Burtescu-1/+13
Fix compilation on Redox This updates the Redox sys module to fix compilation. The functions peek and peek_from are added to TcpStream and UdpSocket as stubs. The sys::backtrace module is now included correctly
2017-02-15Improve backtrace formating while panicking.Yamakaky-3/+8
- `RUST_BACKTRACE=full` prints all the informations (old behaviour) - `RUST_BACKTRACE=(0|no)` disables the backtrace. - `RUST_BACKTRACE=<everything else>` (including `1`) shows a simplified backtrace, without the function addresses and with cleaned filenames and symbols. Also removes some unneded frames at the beginning and the end. Fixes #37783. PR is #38165.
2017-02-14Conversions between CStr/OsStr/Path and boxes.Clar Charr-0/+16
2017-02-08Fix compilation on RedoxJeremy Soller-1/+13
2017-02-06make Child::try_wait return io::Result<Option<ExitStatus>>Jack O'Connor-4/+4
This is much nicer for callers who want to short-circuit real I/O errors with `?`, because they can write this if let Some(status) = foo.try_wait()? { ... } else { ... } instead of this match foo.try_wait() { Ok(status) => { ... } Err(err) if err.kind() == io::ErrorKind::WouldBlock => { ... } Err(err) => return Err(err), } The original design of `try_wait` was patterned after the `Read` and `Write` traits, which support both blocking and non-blocking implementations in a single API. But since `try_wait` is never blocking, it makes sense to optimize for the non-blocking case. Tracking issue: https://github.com/rust-lang/rust/issues/38903
2017-01-30Add dev and ino to MetadataExtJeremy Soller-0/+10
2017-01-25Rollup merge of #39212 - redox-os:master, r=brsonGuillaume Gomez-1/+8
Use libc errno in Redox submodule This fixes https://github.com/redox-os/redox/issues/830, and is necessary when using libc in Redox
2017-01-22libstd: replace all `try!` with `?` in documentation examplesUtkarsh Kukreti-5/+5
See #38644.
2017-01-20Use libc errnoJeremy Soller-1/+8
2017-01-13Add try_wait to Redox processJeremy Soller-0/+14
2016-12-30Add socket timeout and ttl supportJeremy Soller-26/+128
2016-12-27Fix arguments on RedoxJeremy Soller-9/+5
2016-12-23Cloexec when creating directoriesJeremy Soller-1/+1
2016-12-23Add Debug to OpenOptions and DirBuilderJeremy Soller-1/+2
2016-12-23Auto merge of #38401 - redox-os:redox_cross, r=brsonbors-22/+1317
Redox Cross Compilation I will admit - there are things here that I wish I did not have to do. This completes the ability to create a cross compiler from the rust repository for `x86_64-unknown-redox`. I will document this PR with inline comments explaining some things. [View this gist to see how a cross compiler is built](https://gist.github.com/jackpot51/6680ad973986e84d69c79854249f2b7e) Prior discussion of a smaller change is here: https://github.com/rust-lang/rust/pull/38366
2016-12-22Remove start functions, use newlib instead of openlibm + rallocJeremy Soller-131/+0
2016-12-21Add RawFd traits for netJeremy Soller-15/+64
2016-12-20Fix tidyJeremy Soller-3/+6
2016-12-20Fix building without backtraceJeremy Soller-0/+1
2016-12-20Readd statvfsJeremy Soller-0/+26
2016-12-20Move rt into sys::rt, fix tidyJeremy Soller-334/+137
2016-12-20Add arm syscallsJeremy Soller-2/+78
2016-12-16Address falloutAaron Turon-1/+1
2016-12-15Add start functions, switch allocation crate to rallocJeremy Soller-3/+78
2016-12-15WIP: Cross-compilation for Redox targetJeremy Soller-7/+1400
2016-12-12Fix tidy checksJeremy Soller-1/+2
2016-12-12Fix accidental removal of importJeremy Soller-0/+1
2016-12-12Rollback prefixJeremy Soller-3/+3
2016-11-30Cleanup envJeremy Soller-4/+5
2016-11-28Commit to fix make tidyJeremy Soller-42/+155
2016-11-28Remove file path from std::fs::FileJeremy Soller-4/+2