ashgti wrote:

> I see. I take it that's because anonymous pipes are created without 
> FILE_FLAG_OVERLAPPED. Btw, my understanding is that an anonymous pipe is just 
> a named pipe with a funny name (at least until windows 10, or something) and 
> some with some hardcoded flags (like the absence of overlapped I/O). This is 
> why lldb creates "anonymous pipes" as named -- so it can enable overlapped 
> I/O. So for internal pipe uses, I think we're safe. It gets trickier for 
> pipes that get passed from the outside, but I wouldn't be surprised if VSCode 
> did something similar -- it's likely it also wants to do some overlapped I/O.
> 
> Could you check if that is the case?
> 
> I'm not sure what that would mean for the implementation (I like the 
> generality, but I also hate the idea of creating a thread for every pipe 
> object), but I think it'd be good to have know this.

I made a sample binary 
(https://gist.github.com/ashgti/1649fde8ef28783ace1e414f87a6b680) and it seems 
`stdin` is opened as an anonymous pipe. 

I'm getting `FILE_SYNCHRONOUS_IO_NONALERT` (see 
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_mode_information#file_synchronous_io_nonalert)
 as the file mode, which corresponds to an anonymous pipe.

https://github.com/llvm/llvm-project/pull/145621
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to