rust/src
Samrat Man Singh 563fb8e43d Implement dup and close for stdin/stdout/stderr
Support F_DUPFD on stdin/stdout/stderr

Enable `close`-ing stdin/stdout/stderr

For `dup`, check if FD is `File` first

If not, clone the appropriate standard IO stream

Merge POSIX `close` and `dup` tests into same module

Also, add assertion that `write` on a closed FD returns an error.

Add `dup` as FileDescriptor trait fn

Also:
- Fix `close` so it drops `self` instead of reference to it
- Remove FD clamping in insert_fd_with_min_fd, since FDs 0-2 can be
closed

Fix fs_libc tests

Make error message when closing stdin/out/err more specific

Return io::Result from `FileDescriptor::dup`

Change error message when closing stdin/out/err

Refactor `FileDescriptor::dup` impl for `FileHandle`

Remove empty line
2020-09-09 23:26:33 +05:30
..
bin make alignment check integer-based by default, and add an option to make it symbolic 2020-08-16 17:08:38 +02:00
shims Implement dup and close for stdin/stdout/stderr 2020-09-09 23:26:33 +05:30
diagnostics.rs adjust diagnostics to alignment check mode 2020-08-16 17:16:53 +02:00
eval.rs Per-thread errno storage 2020-09-02 20:57:20 -05:00
helpers.rs Use try block instead of closure 2020-09-07 15:09:34 -05:00
intptrcast.rs adjust to canonical_alloc_id removal 2020-07-27 23:32:15 +02:00
lib.rs Use try block instead of closure 2020-09-07 15:09:34 -05:00
machine.rs Per-thread errno storage 2020-09-02 20:57:20 -05:00
mono_hash_map.rs avoid ref in matches 2020-04-12 10:08:12 +02:00
operator.rs renamed ScalarMaybeUninit::not_undef to check_init 2020-07-26 16:05:20 -06:00
range_map.rs rustup for import changes 2020-04-03 00:05:35 +02:00
stacked_borrows.rs Change ty.kind -> ty.kind() 2020-09-04 22:03:45 +02:00
sync.rs move rwlock dequeuing to shared code, and use that code for Windows rwlocks 2020-06-28 11:28:46 +02:00
thread.rs Per-thread errno storage 2020-09-02 20:57:20 -05:00