This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]