mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-08 18:19:08 +08:00
Cygwin: AF_UNIX: sendmsg: fix errno if socket is shut down
Following Posix and Linux, the errno should be EPIPE, not ESHUTDOWN.
This commit is contained in:
parent
e1beea13e1
commit
95012189c0
@ -2493,7 +2493,11 @@ fhandler_socket_unix::sendmsg (const struct msghdr *msg, int flags)
|
||||
}
|
||||
if (saw_shutdown () & _SHUT_SEND)
|
||||
{
|
||||
set_errno (ESHUTDOWN);
|
||||
set_errno (EPIPE);
|
||||
/* FIXME: Linux calls for SIGPIPE here, but Posix
|
||||
doesn't. Should we follow Linux? */
|
||||
if (!(flags & MSG_NOSIGNAL))
|
||||
raise (SIGPIPE);
|
||||
__leave;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user