This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
HEADSUP: New behaviour of socket send/write functionality
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: cygapp <cygwin-apps at cygwin dot com>, cygdev <cygwin-developers at cygwin dot com>
- Date: Wed, 28 Aug 2002 13:28:35 +0200
- Subject: HEADSUP: New behaviour of socket send/write functionality
Hi,
I've just checked in a change to the socket function sendto() which
changes the behaviour when the socket has been shutdown, e.g. by the
peer.
In that case send() returned -1 and ESHUTDOWN so far. According to
SUSv3 and Linux, send() *should* return EPIPE and raise the SIGPIPE
signal. The Linux implementation additionally knows a flag called
MSG_NOSIGNAL which suppresses the SIGPIPE signal in that case.
My patch implements just that, returning EPIPE instead of ESHUTDOWN
and raising SIGPIPE if not MSG_NOSIGNAL is given in the flags argument.
I thought it would be good to give this heads up, since that fix could
change the behaviour of some applications. I checked ssh, sshd, inetd
and friends, that they still work so the change doesn't break everything.
But I'd like to encourage the maintainers of socket related applications
to check, if their application still works as expected. The change could
also coincidentally result in solving some problems about hanging apps
(rsync, perhaps?) but that's not sure, obviously.
Ok, that's all folks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.