rust/library/std/src
Tomasz Miąsko 7d98d2207a Reopen standard streams when they are closed on Unix
The syscalls returning a new file descriptors generally use
lowest-numbered file descriptor not currently opened, without any
exceptions for those corresponding to the standard streams.

Previously when any of standard streams has been closed before starting
the application, operations on std::io::{stderr,stdin,stdout} objects
were likely to operate on other logically unrelated file resources
opened afterwards.

Avoid the issue by reopening the standard streams when they are closed.
2020-09-27 22:55:43 +02:00
..
backtrace std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
collections Rollup merge of #76917 - GuillaumeGomez:map-missing-code-examples, r=Dylan-DPC 2020-09-27 01:53:13 +02:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f64 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
ffi Implement destructuring for all aggregates and for references 2020-09-20 13:28:18 +02:00
fs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
io Auto merge of #77154 - fusion-engineering-forks:lazy-stdio, r=dtolnay 2020-09-27 04:50:46 +00:00
lazy std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
memchr std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
net Rollup merge of #76304 - CDirkx:const-ip, r=ecstatic-morse 2020-09-25 02:29:30 +02:00
num std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
os library/std: raw: Add support for RISC-V 32-bit 2020-09-16 08:44:35 -07:00
path std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
prelude Fix incorrect link in prelude 2020-09-02 17:38:21 -04:00
process std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
sync Rollup merge of #76932 - fusion-engineering-forks:condvar-promise, r=sfackler 2020-09-25 19:42:28 +02:00
sys Reopen standard streams when they are closed on Unix 2020-09-27 22:55:43 +02:00
sys_common Rollup merge of #77164 - fusion-engineering-forks:no-more-funny-underscores, r=Mark-Simulacrum 2020-09-25 02:29:51 +02:00
thread Auto merge of #74225 - poliorcetics:std-thread-unsafe-op-in-unsafe-fn, r=joshtriplett 2020-09-26 03:54:00 +00:00
time std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
alloc.rs a few more &mut self -> self changes 2020-09-22 21:04:31 -07:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
env.rs Improve docs for std::env::args() 2020-09-04 14:00:09 -07:00
error.rs Mark Error impl for LayoutErr as stable. 2020-09-11 13:36:15 +02:00
f32.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f64.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
fs.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
future.rs Fix stabilization marker for future_readiness_fns 2020-09-15 23:12:08 +02:00
keyword_docs.rs Improve wording for const pointers 2020-09-01 19:44:20 -07:00
lazy.rs Simplify SyncOnceCell's take and drop. 2020-09-12 14:00:38 +02:00
lib.rs Add new feature gate to standard library 2020-09-25 10:38:21 -07:00
macros.rs Add missing links 2020-08-22 20:23:50 -07:00
memchr.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
num.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
panic.rs Mark RefUnwindSafe impls for stable atomic types as stable. 2020-09-11 13:36:15 +02:00
panicking.rs Abort when catch_unwind catches a foreign exception 2020-08-27 21:08:30 +01:00
path.rs Rollup merge of #73963 - hellow554:unsafe_path, r=Mark-Simulacrum 2020-09-19 11:47:31 +02:00
primitive_docs.rs Add doc alias for pointer primitive 2020-09-26 11:21:24 +02:00
process.rs Rollup merge of #76275 - FedericoPonzi:immutable-write-impl-73836, r=dtolnay 2020-09-21 20:40:44 -07:00
rt.rs Prevent __rust_begin_short_backtrace frames from being tail-call optimised away 2020-08-07 19:31:25 +01:00
time.rs Rollup merge of #76162 - abrausch:documentation-fix-duration_since, r=jyn514 2020-09-09 01:35:10 +02:00