Re: [PATCH 0/5] More FIFO bug fixes
On Apr 20 18:58, Ken Brown wrote: > I'll be glad to commit these myself, but I thought I should send them > here first for the record and for review. > > Ken Brown (5): > Cygwin: FIFO: stop the listen_client thread on an opening error > Cygwin: FIFO: duplicate the i/o handle when opening a duplexer > Cygwin: FIFO: avoid WFMO error in listen_client_thread > Cygwin: FIFO: close connect_evt handles as soon as possible > Cygwin: FIFO: stop the listen_client thread before fork/exec > > winsup/cygwin/fhandler.h | 3 ++ > winsup/cygwin/fhandler_fifo.cc | 55 -- > 2 files changed, 42 insertions(+), 16 deletions(-) Reviewed. I don't see anything evidently wrong. Please push. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer signature.asc Description: PGP signature
[PATCH] Minor improvements to socket error handling:
* Change default fallback for failed winsock error -> POSIX error mappings to EACCES, which is a valid errno for more socket-related syscalls. * Added a few previously missing entries to the wsock_errmap table that have obvious POSIX errno.h analogues. --- winsup/cygwin/net.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index cd296d19d..437712c63 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -177,6 +177,9 @@ static const errmap_t wsock_errmap[] = { {WSAEREMOTE, "WSAEREMOTE", EREMOTE}, {WSAEINVAL, "WSAEINVAL", EINVAL}, {WSAEFAULT, "WSAEFAULT", EFAULT}, + {WSAEBADF, "WSAEBADF", EBADF}, + {WSAEACCES, "WSAEACCES", EACCES}, + {WSAEMFILE, "WSAEMFILE", EMFILE}, {0, "NOERROR", 0}, {0, NULL, 0} }; @@ -188,7 +191,7 @@ find_winsock_errno (DWORD why) if (why == wsock_errmap[i].w) return wsock_errmap[i].e; - return EPERM; + return EACCES; } void -- 2.15.1
Re: [PATCH] Minor improvements to socket error handling:
On Apr 23 16:55, Erik M. Bray wrote: > * Change default fallback for failed winsock error -> POSIX error > mappings to EACCES, which is a valid errno for more socket-related > syscalls. > > * Added a few previously missing entries to the wsock_errmap table > that have obvious POSIX errno.h analogues. > --- > winsup/cygwin/net.cc | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc > index cd296d19d..437712c63 100644 > --- a/winsup/cygwin/net.cc > +++ b/winsup/cygwin/net.cc > @@ -177,6 +177,9 @@ static const errmap_t wsock_errmap[] = { >{WSAEREMOTE, "WSAEREMOTE", EREMOTE}, >{WSAEINVAL, "WSAEINVAL", EINVAL}, >{WSAEFAULT, "WSAEFAULT", EFAULT}, > + {WSAEBADF, "WSAEBADF", EBADF}, > + {WSAEACCES, "WSAEACCES", EACCES}, > + {WSAEMFILE, "WSAEMFILE", EMFILE}, >{0, "NOERROR", 0}, >{0, NULL, 0} > }; > @@ -188,7 +191,7 @@ find_winsock_errno (DWORD why) > if (why == wsock_errmap[i].w) >return wsock_errmap[i].e; > > - return EPERM; > + return EACCES; > } > > void > -- > 2.15.1 Pushed, thanks! I'm building dev snapshots right now, should be up in a couple of mins. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer signature.asc Description: PGP signature