Cygwin: FIFO: make opening a writer more robust
- Make read_ready a manual-reset event. - Signal read_ready in open instead of in the listen_client_thread. - Don't reset read_ready when the listen_client thread terminates; instead do it in close(). - Rearrange open and change its error handling. - Add a wait_open_pipe method that waits for a pipe instance to be available and then calls open_pipe. Use it when opening a writer if we can't connect immediately. This can happen if the system is heavily loaded and/or if many writers are trying to open simultaneously.
This commit is contained in:
@@ -1323,6 +1323,7 @@ class fhandler_fifo: public fhandler_base
|
||||
static NTSTATUS npfs_handle (HANDLE &);
|
||||
HANDLE create_pipe_instance (bool);
|
||||
NTSTATUS open_pipe (HANDLE&);
|
||||
NTSTATUS wait_open_pipe (HANDLE&);
|
||||
int add_client_handler ();
|
||||
void delete_client_handler (int);
|
||||
bool listen_client ();
|
||||
|
Reference in New Issue
Block a user