newlib/winsup/cygwin/release/2.11.2
Corinna Vinschen 535903696c Cygwin: honor SOCK_NONBLOCK/SOCK_CLOEXEC in socket(2)/socketpair(2)
fhandler_socket_wsock::set_socket_handle calls set_flags after
setting the O_NONBLOCK/O_CLOEXEC flags, thus overwriting them.

It also turns out that fhandler_socket_wsock::init_events is called
too late.  The inheritence flags are changed before creating the
socket event handling objects.  Thus, inheritence flags for
those objects are wrong with SOCK_CLOEXEC.

Fix this by reordering the calls and setting the file flags through
fhandler_base::set_flags.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-11-05 21:02:22 +01:00

25 lines
650 B
Groff

What's new:
-----------
What changed:
-------------
Bug Fixes
---------
- Return ESPIPE rather than EINVAL from lseek on a fifo.
Addresses: https://cygwin.com/ml/cygwin/2018-10/msg00019.html
- Fix a memory corruption when using pipes or FIFOs
Addresses: https://cygwin.com/ml/cygwin-patches/2018-q4/msg00000.html
- Fix potential memory corruption and SEGV if socket(2), socketpair(2),
accept(2), or accept4(2) fail.
Addresses: https://cygwin.com/ml/cygwin/2018-10/msg00229.html
- Fix socket(2) and socketpair(2) calls mishandling SOCK_NONBLOCK and
SOCK_CLOEXEC flags.
Addresses: https://cygwin.com/ml/cygwin/2018-11/msg00017.html