phobos/std/c
David Nadlinger 5ae54cbf5d Disable SIGPIPE on send()ing to a Socket on OS X.
Previously, std.socket code assumed that MSG_NOSIGNAL existed on all platforms, which is not the case – std.c.osx.socket actually has a comment saying »Not defined in OS X, but we'll use them anyway«. This lead to Socket.send() raising SIGPIPE on OS X if the peer had already closed the connection.

With this commit, std.socket sets the SO_NOSIGPIPE socket option on systems that support it for the same effect as MSG_NOSIGNAL on Linux.

Strictly speaking, removing the NOSIGNAL SocketFlag is a breaking API change, but I do not think there is any code actually using it, as it has always been set implicitly by std.socket anyway.
2011-07-05 15:33:07 +02:00
..
freebsd Use new core.sys.posix.netdb. 2011-06-15 19:51:33 +02:00
linux Use new core.sys.posix.netdb. 2011-06-15 19:51:33 +02:00
osx Disable SIGPIPE on send()ing to a Socket on OS X. 2011-07-05 15:33:07 +02:00
windows Disable SIGPIPE on send()ing to a Socket on OS X. 2011-07-05 15:33:07 +02:00
fenv.d detab sources 2010-08-23 02:14:45 +00:00
locale.d detab sources 2010-08-23 02:14:45 +00:00
math.d detab sources 2010-08-23 02:14:45 +00:00
process.d C function pointers -> D syntax 2010-10-02 02:42:48 +00:00
stdarg.d detab sources 2010-08-23 02:14:45 +00:00
stddef.d detab sources 2010-08-23 02:14:45 +00:00
stdio.d detab sources 2010-08-23 02:14:45 +00:00
stdlib.d detab sources 2010-08-23 02:14:45 +00:00
string.d detab sources 2010-08-23 02:14:45 +00:00
time.d detab sources 2010-08-23 02:14:45 +00:00
wcharh.d detab sources 2010-08-23 02:14:45 +00:00