about summary refs log tree commit diff
path: root/src/libstd/sys/vxworks
AgeCommit message (Collapse)AuthorLines
2020-04-01In Thread::new, add a comment that a panic could cause a memory leak.Vytautas Astrauskas-1/+4
2020-03-31Use Box::into_raw instead of ManuallyDrop in Thread::new.Vytautas Astrauskas-9/+4
2020-03-31Inline start_thread into its callers.Vytautas Astrauskas-4/+6
2020-03-31Fix double-free and undefined behaviour in libstd::syn::unix::Thread::new.Vytautas Astrauskas-3/+10
2020-03-21Rollup merge of #69955 - alexcrichton:stderr-infallible, r=sfacklerDylan DPC-2/+2
Fix abort-on-eprintln during process shutdown This commit fixes an issue where if `eprintln!` is used in a TLS destructor it can accidentally cause the process to abort. TLS destructors are executed after `main` returns on the main thread, and at this point we've also deinitialized global `Lazy` values like those which store the `Stderr` and `Stdout` internals. This means that despite handling TLS not being accessible in `eprintln!`, we will fail due to not being able to call `stderr()`. This means that we'll double-panic quickly because panicking also attempt to write to stderr. The fix here is to reimplement the global stderr handle to avoid the need for destruction. This avoids the need for `Lazy` as well as the hidden panic inside of the `stderr` function. Overall this should improve the robustness of printing errors and/or panics in weird situations, since the `stderr` accessor should be infallible in more situations.
2020-03-20Fix abort-on-eprintln during process shutdownAlex Crichton-2/+2
This commit fixes an issue where if `eprintln!` is used in a TLS destructor it can accidentally cause the process to abort. TLS destructors are executed after `main` returns on the main thread, and at this point we've also deinitialized global `Lazy` values like those which store the `Stderr` and `Stdout` internals. This means that despite handling TLS not being accessible in `eprintln!`, we will fail due to not being able to call `stderr()`. This means that we'll double-panic quickly because panicking also attempt to write to stderr. The fix here is to reimplement the global stderr handle to avoid the need for destruction. This avoids the need for `Lazy` as well as the hidden panic inside of the `stderr` function. Overall this should improve the robustness of printing errors and/or panics in weird situations, since the `stderr` accessor should be infallible in more situations.
2020-03-14Rollup merge of #69403 - LeSeulArtichaut:copy-ioslice, r=sfacklerYuki Okushi-0/+1
Implement `Copy` for `IoSlice` Resolves #69395 r? @sfackler
2020-03-06fix various typosMatthias Krüger-1/+1
2020-02-23Implement `Copy` for `IoSlice`LeSeulArtichaut-0/+1
2020-01-25Rollup merge of #68515 - Wind-River:master_2020, r=alexcrichtonYuki Okushi-5/+39
Support feature process_set_argv0 for VxWorks r? @alexcrichton
2020-01-24Support feature process_set_argv0 for VxWorksBaoshanPang-5/+39
2020-01-10make use of pointer::is_nullLzu Tao-4/+3
2020-01-06ignore signal SIGPIPEBaoshanPang-10/+2
2020-01-06Remove weak.rs for VxWorksUmesh Kalappa-56/+0
2020-01-04Rollup merge of #67848 - ollie27:float_link_name_attr, r=Dylan-DPCGuillaume Gomez-1/+0
Remove unused `#[link_name = "m"]` attributes These were perhaps supposed to be `#[link(name = "m")]` but linking libm should be handled by the libc crate anyway. They should have triggered a compile error: #47725
2020-01-03Remove unused `#[link_name = "m"]` attributesOliver Middleton-1/+0
These were perhaps supposed to be `#[link(name = "m")]` but linking libm should be handled by the libc crate anyway.
2020-01-02Use drop instead of the toilet closure `|_| ()`Lzu Tao-7/+7
2019-12-24Deprecate Error::description for realDavid Tolnay-0/+1
`description` has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it. This commit: - adds #[rustc_deprecated(since = "1.41.0")] to Error::description; - moves description (and cause, which is also deprecated) below the source and backtrace methods in the Error trait; - reduces documentation of description and cause to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call description; - removes the description function of all *currently unstable* Error impls in the standard library; - marks #[allow(deprecated)] the description function of all *stable* Error impls in the standard library; - replaces miscellaneous uses of description in example code and the compiler.
2019-12-22Format the worldMark Rousskov-67/+80
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-2/+2
2019-12-20Remove `SOCK_CLOEXEC` dummy variable on platforms that don't use it.Markus Reiter-2/+0
2019-12-18Remove `SO_NOSIGPIPE` dummy variable on platforms that don't use it.Markus Reiter-1/+0
2019-12-06Rollup merge of #67041 - Wind-River:master_base, r=alexcrichtonYuki Okushi-0/+3
add ExitStatusExt into prelude r? @alexcrichton
2019-12-06Rollup merge of #66649 - Wind-River:master_xyz, r=alexcrichtonYuki Okushi-9/+22
VxWorks: fix issues in accessing environment variables
2019-12-03add ExitStatusExt into preludeBaoshanPang-0/+3
2019-11-29Format libstd/sys with rustfmtDavid Tolnay-480/+524
This commit applies rustfmt with rust-lang/rust's default settings to files in src/libstd/sys *that are not involved in any currently open PR* to minimize merge conflicts. THe list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in outstanding_files, the relevant commands were: $ find src/libstd/sys -name '*.rs' \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ rg libstd/sys outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of the files. To confirm no funny business: $ git checkout $THIS_COMMIT^ $ git show --pretty= --name-only $THIS_COMMIT \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ git diff $THIS_COMMIT # there should be no difference
2019-11-22ensure that access to the environment is synchronizedBaoshanPang-9/+18
2019-11-22pass the captured environment variables to rtpSpawnBaoshanPang-1/+5
2019-11-05Rollup merge of #66091 - Wind-River:master_xyz, r=cramertjPietro Albini-1/+2
Implemented the home_dir for VxWorks Use HOME's value if it is set; otherwise return NONE.
2019-11-05Rollup merge of #65905 - cuviper:doc-unix-mode, r=Dylan-DPCPietro Albini-2/+2
[doc] fixes for unix/vxworks `OpenOptionsExt::mode`
2019-11-04Implemented the home_dir for VxWorksUmesh Kalappa-1/+2
2019-10-29vxWorks: remove all code related to UNIX socket as it is not supported by ↵BaoshanPang-1828/+60
vxWorks
2019-10-28[doc] fix the reference to using `OpenOptions::open`Josh Stone-1/+1
2019-10-28[doc] add a possessive apostrophe in `OpenOptionsExt::mode`Josh Stone-1/+1
2019-10-13Rollup merge of #65246 - Wind-River:real_master_2, r=kennytmMazdak Farrokhzad-6/+20
vxWorks: implement get_path() and get_mode() for File fmt::Debug
2019-10-10vxWorks: implement get_path() and get_mode() for File fmt::DebugBaoshanPang-6/+20
2019-10-08add checking (r == 0)Baoshan Pang-1/+1
2019-09-25update rtpSpawn's parameters type(It's prototype has been updated in libc)Baoshan Pang-2/+2
2019-09-23remove rtp.rs, and move rtpSpawn and RTP_ID_ERROR to libcBaoshan Pang-302/+2
2019-09-20Merge pull request #25 from Wind-River/statn-salim-1/+1
rust stat should call libc stat
2019-09-20rust stat should call libc statBaoshan Pang-1/+1
2019-09-20No home directory on vxWorksBaoshan Pang-22/+1
2019-09-14Rollup merge of #64393 - Wind-River:master_002_envKey, r=alexcrichtonMazdak Farrokhzad-2/+1
declare EnvKey before use to fix build error r? @alexcrichton
2019-09-14Rollup merge of #64372 - Wind-River:master, r=alexcrichtonMazdak Farrokhzad-7/+14
use randSecure and randABytes r? @alexcrichton cc @n-salim
2019-09-10declare EnvKey before use to fix build errorBaoshan Pang-2/+1
2019-09-11Rollup merge of #64129 - Wind-River:master_003, r=alexcrichtonMazdak Farrokhzad-5/+3
vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn r? @alexcrichton cc @n-salim
2019-09-10use randSecure and randABytesBaoshan Pang-7/+14
2019-09-10remove Copyright noticBaoshan Pang-6/+0
2019-09-05std: Improve downstream codegen in `Command::env`Alex Crichton-4/+6
This commit rejiggers the generics used in the implementation of `Command::env` with the purpose of reducing the amount of codegen that needs to happen in consumer crates, instead preferring to generate code into libstd. This was found when profiling the compile times of the `cc` crate where the binary rlib produced had a lot of `BTreeMap` code compiled into it but the crate doesn't actually use `BTreeMap`. It turns out that `Command::env` is generic enough to codegen the entire implementation in calling crates, but in this case there's no performance concern so it's fine to compile the code into the standard library. This change is done by removing the generic on the `CommandEnv` map which is intended to handle case-insensitive variables on Windows. Instead now a generic isn't used but rather a `use` statement defined per-platform is used. With this commit a debug build of `Command::new("foo").env("a", "b")` drops from 21k lines of LLVM IR to 10k.
2019-09-01vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass ↵Baoshan Pang-3/+7
initial stack size to rtpSpawn