diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-06-17 23:19:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-17 23:19:34 +0200 |
| commit | b5fcc90fd7cba5232be37e4ca79fd44d2d3c3196 (patch) | |
| tree | 2787c9dce1df6140548857f8c51a195f1fa1f63e /compiler/rustc_codegen_llvm/src | |
| parent | e95fb09dfbd9d25f0a12e7ea84fdf3a896533d54 (diff) | |
| parent | 0e1db54b7eba50b79ff318eb31bf44e0c7b6a4c2 (diff) | |
| download | rust-b5fcc90fd7cba5232be37e4ca79fd44d2d3c3196.tar.gz rust-b5fcc90fd7cba5232be37e4ca79fd44d2d3c3196.zip | |
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*
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
