Cygwin: FIFO: re-implement duplexers

When opening a duplexer, open a client connection to the first client
handler.  Previously we gave the duplexer a bogus write handle, which
was just a duplicate of the first client handler's handle.  This meant
that we had a pipe server with no clients connected, and all I/O
attempts failed with STATUS_PIPE_LISTENING.

Extend the last fcntl change to duplexers.

Remove a now unused fifo_client_handler constructor, as well as the
long unusued method fifo_client_handler::connect.

Don't create the pipe in duplex mode; the server handle will only be
used for reading.
This commit is contained in:
Ken Brown
2019-05-09 11:23:44 -04:00
parent f3d1fe2ff8
commit 00b2e56d31
2 changed files with 13 additions and 36 deletions

View File

@ -1251,10 +1251,6 @@ struct fifo_client_handler
fifo_client_connect_state state;
HANDLE connect_evt;
fifo_client_handler () : fh (NULL), state (fc_unknown), connect_evt (NULL) {}
fifo_client_handler (fhandler_base *_fh, fifo_client_connect_state _state,
HANDLE _connect_evt)
: fh (_fh), state (_state), connect_evt (_connect_evt) {}
int connect ();
int close ();
};