rust/library/std/src/sys
Dylan DPC b4536943e3
Rollup merge of #103360 - ChrisDenton:isterm-filetype, r=thomcc
Reduce false positives in msys2 detection

Currently msys2 will be detected by getting the file path and looking to see if it contains the substrings "msys-" and "-ptr" (or "cygwin-" and "-pty"). This risks false positives, especially with filesystem files and if `GetFileInformationByHandleEx` returns a [full path](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntqueryinformationfile#remarks).

This PR adds a check to see if the handle is a pipe before doing the substring search. Additionally, for "msys2-" or "cygwin-" it only checks if the file name starts with the substring rather than looking at the whole path.
2022-10-22 16:28:09 +05:30
..
common Reduce CString allocations in std as much as possible 2022-10-03 11:13:17 -07:00
hermit std: use sync::Mutex for internal statics 2022-10-13 12:55:14 +02:00
itron std: make ReentrantMutex movable and const; simplify Stdout initialization 2022-09-03 14:05:28 +02:00
sgx Bugfix: keep TLS data in sync 2022-10-14 17:07:18 +02:00
solid Auto merge of #102655 - joboet:windows_tls_opt, r=ChrisDenton 2022-10-13 06:49:29 +00:00
unix Change process spawning to inherit the parent's signal mask by default 2022-10-20 14:53:38 -07:00
unsupported Add IsTerminal trait to determine if a descriptor or handle is a terminal 2022-10-15 00:35:38 +01:00
wasi Add IsTerminal trait to determine if a descriptor or handle is a terminal 2022-10-15 00:35:38 +01:00
wasm std: use sync::RwLock for internal statics 2022-09-19 23:27:26 +02:00
windows Reduce false positives in msys2 detection 2022-10-21 18:06:12 +01:00
mod.rs Reduce CString allocations in std as much as possible 2022-10-03 11:13:17 -07:00