From 43965a1080197fcdb69eb48645f01c393171a5fb Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 13 Apr 2012 13:34:22 +0200 Subject: If available, use MSG_NOSIGNAL for send() Signed-off-by: Martin Sustrik --- src/stream_engine.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/stream_engine.cpp') diff --git a/src/stream_engine.cpp b/src/stream_engine.cpp index ed03f59..a4df7f3 100644 --- a/src/stream_engine.cpp +++ b/src/stream_engine.cpp @@ -305,7 +305,11 @@ int xs::stream_engine_t::write (const void *data_, size_t size_) #else +#if defined MSG_NOSIGNAL + ssize_t nbytes = send (s, data_, size_, MSG_NOSIGNAL); +#else ssize_t nbytes = send (s, data_, size_, 0); +#endif // Several errors are OK. When speculative write is being done we may not // be able to write a single byte from the socket. Also, SIGSTOP issued -- cgit v1.2.3