Skip to content

Commit

Permalink
SO_NOSIGPIPE guard fix
Browse files Browse the repository at this point in the history
Signed-off-by: Rohan Mars <code@rohanmars.com>
  • Loading branch information
rohanmars committed Oct 28, 2015
1 parent f6d0d41 commit 9e89c55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/msg/simple/Pipe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@ int Pipe::do_sendmsg(struct msghdr *msg, int len, bool more)
}
}
}
#if !defined(MSG_NOSIGNAL) && !defined(SO_SIGPIPE)
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE)
restore_sigpipe();
#endif
return 0;
Expand Down Expand Up @@ -2611,7 +2611,7 @@ int Pipe::tcp_write(const char *buf, int len)

//lgeneric_dout(cct, DBL) << "tcp_write writing " << len << dendl;
assert(len > 0);
#if !defined(MSG_NOSIGNAL) && !defined(SO_SIGPIPE)
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE)
suppress_sigpipe();
#endif

Expand All @@ -2631,7 +2631,7 @@ int Pipe::tcp_write(const char *buf, int len)
buf += did;
//lgeneric_dout(cct, DBL) << "tcp_write did " << did << ", " << len << " left" << dendl;
}
#if !defined(MSG_NOSIGNAL) && !defined(SO_SIGPIPE)
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE)
restore_sigpipe();
#endif

Expand Down

0 comments on commit 9e89c55

Please sign in to comment.