Files
rust/library/std/src
Jacob Pratt b5fcc90fd7 Rollup merge of #142517 - ChrisDenton:anon-pipe, r=Mark-Simulacrum
Windows: Use anonymous pipes in Command

When setting `Stdio::pipe` on `Command` we want to create an anonymous pipe that can be used asynchronously (at least on our end). Usually we'd use [`CreatePipe`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe) to open anonymous pipes but unfortunately it opens pipes for synchronous access. The alternative is to use [`CreateNamedPipeW`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createnamedpipew) which does allow asynchronous access but that requires giving a file name to the pipe. So we currently have this awful hack where we attempt to emulate anonymous pipes using `CreateNamedPipeW` by attempting to create a unique name and looping until we find one that doesn't already exist.

The better option is to use the lower level [`NtCreateNamedPipeFile`](https://learn.microsoft.com/en-us/windows/win32/devnotes/nt-create-named-pipe-file) (which is used internally by both `CreatePipe` and `CreateNamedPipeW`). This function wasn't documented until a few years ago but now that it is it's ok for us to use it.

try-job: *msvc*
try-job: *mingw*
2025-06-17 23:19:34 +02:00
..
2023-12-10 10:56:22 +08:00
2024-11-02 11:27:14 +01:00
2025-04-04 14:47:04 +02:00
2025-05-12 15:33:37 +02:00
2025-02-13 13:10:28 -08:00
2025-05-12 15:33:37 +02:00
2025-01-11 06:35:21 +02:00
2025-06-15 06:44:46 -07:00
2025-06-09 12:36:24 +02:00
2025-02-25 09:08:22 +05:30
2024-04-08 11:57:17 +00:00
2025-03-10 21:23:32 +08:00
2025-05-15 11:20:13 +02:00
2025-02-07 16:54:07 +01:00