summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnet_unix_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-09-11 15:53:17 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-24 21:27:51 +0200
commitcb7d64170d62c9cda11ced7e5047070af678338b (patch)
treec4dd91f599f3a69ac9b4d5c2b5c3cedc9f7160af /src/network/socket/qnet_unix_p.h
parenteb42be700a3ef5161a81a7fc77814792eb0e08e8 (diff)
Centralise handling & ignoring of SIGPIPE in qcore_unix_p.h
We had two instances of this function in the Qt source code, one clearly a copy of the other, so both had the same thread-safety issue. Instead, let's have one copy and have both write_nosignal() and sendto() call them. Q_NO_POSIX_SIGNALS is also gone. It was only used with Symbian. Change-Id: I0f1354a8e9df8e6b10a02f86a940e3c6d1222087 Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/network/socket/qnet_unix_p.h')
-rw-r--r--src/network/socket/qnet_unix_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h
index dd13e3efcf..4b212c9709 100644
--- a/src/network/socket/qnet_unix_p.h
+++ b/src/network/socket/qnet_unix_p.h
@@ -188,6 +188,8 @@ static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int fl
{
#ifdef MSG_NOSIGNAL
flags |= MSG_NOSIGNAL;
+#else
+ qt_ignore_sigpipe();
#endif
register int ret;