mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-13 12:39:22 +08:00
Cygwin: AF_UNIX: listen_pipe: consider STATUS_PIPE_CLOSING
NtFsControlFile(FSCTL_PIPE_LISTEN) can return STATUS_PIPE_CLOSING if a process has already connected to the pipe, written, and closed its handle. Treat this case the same as STATUS_SUCCESS. FIXME: We need to check more carefully that there isn't really an error condition.
This commit is contained in:
parent
d2fb5bc045
commit
451ec9bb13
@ -1142,6 +1142,14 @@ fhandler_socket_unix::listen_pipe ()
|
||||
set_errno (EINTR);
|
||||
else if (status == STATUS_PIPE_LISTENING)
|
||||
set_errno (EAGAIN);
|
||||
else if (status == STATUS_PIPE_CLOSING)
|
||||
{
|
||||
/* FIXME: For now I'm assuming that someone connected, wrote,
|
||||
and closed. But we should probably query the os to be sure,
|
||||
as in fhandler_fifo.cc. */
|
||||
debug_printf ("STATUS_PIPE_CLOSING");
|
||||
ret = 0;
|
||||
}
|
||||
else if (status == STATUS_SUCCESS || status == STATUS_PIPE_CONNECTED)
|
||||
ret = 0;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user