summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3328542)
Applications using the liblttng-ctl library are most probably
not expecting the SIGPIPE signal which can be triggered by
sendmsg() on a closed socket. Use the MSG_NOSIGNAL flag to
handle such cases gracefully.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
do {
len_last = iov[0].iov_len;
do {
len_last = iov[0].iov_len;
- ret = recvmsg(sock, &msg, 0);
+ ret = recvmsg(sock, &msg, MSG_NOSIGNAL);
if (ret > 0) {
iov[0].iov_base += ret;
iov[0].iov_len -= ret;
if (ret > 0) {
iov[0].iov_base += ret;
iov[0].iov_len -= ret;