mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-11 19:49:15 +08:00
* fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
SIGPIPE handling to connection oriented sockets. Add comment.
This commit is contained in:
parent
4da34970de
commit
fa85038b5f
@ -1,3 +1,8 @@
|
|||||||
|
2003-03-20 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
|
||||||
|
SIGPIPE handling to connection oriented sockets. Add comment.
|
||||||
|
|
||||||
2003-03-19 Christopher Faylor <cgf@redhat.com>
|
2003-03-19 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
|
* sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
|
||||||
|
@ -1058,8 +1058,13 @@ fhandler_socket::sendto (const void *ptr, size_t len, int flags,
|
|||||||
else
|
else
|
||||||
res = ret;
|
res = ret;
|
||||||
|
|
||||||
/* Special handling for SIGPIPE */
|
/* Special handling for EPIPE and SIGPIPE.
|
||||||
if (res == -1 && get_errno () == ESHUTDOWN)
|
|
||||||
|
EPIPE is generated if the local end has been shut down on a connection
|
||||||
|
oriented socket. In this case the process will also receive a SIGPIPE
|
||||||
|
unless MSG_NOSIGNAL is set. */
|
||||||
|
if (res == -1 && get_errno () == ESHUTDOWN
|
||||||
|
&& get_socket_type () == SOCK_STREAM)
|
||||||
{
|
{
|
||||||
set_errno (EPIPE);
|
set_errno (EPIPE);
|
||||||
if (! (flags & MSG_NOSIGNAL))
|
if (! (flags & MSG_NOSIGNAL))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user