[PATCH v2 5/6] Cygwin: AF_UNIX: listen_pipe: check for STATUS_SUCCESS

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Oct 13 15:31:35 GMT 2020


On Oct 13 13:18, Ken Brown via Cygwin-patches wrote:
> On 10/13/2020 7:28 AM, Corinna Vinschen wrote:
> > On Oct  4 12:49, Ken Brown via Cygwin-patches wrote:
> >> A successful connection can be indicated by STATUS_SUCCESS or
> >> STATUS_PIPE_CONNECTED.
> > 
> > THanks for catching but... huh?  How does Windows generate two different
> > status codes for the same result from the same function?
> 
> I think (but I'd have to recheck) that if the pipe is already connected when 
> NtFsControlFile is called, then the latter returns STATUS_PIPE_CONNECTED.  But 
> if you first get STATUS_PENDING and then set status = io.Status after 
> completion, then the result is STATUS_SUCCESS.

Ah, ok.  I guess I just missed this scenario for some reason.


Thanks,
Corinna


More information about the Cygwin-patches mailing list