X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fsessiond-comm.c;h=477bd1c644ca18a6d87bde40212e46678a3db0b1;hp=8a5ff1d3f10520efb26bef784dc7847fd7fba033;hb=d2641a837d460c275884523d67120379711dc38c;hpb=34a2494f54d3dd06aa5ef49785cdd8606c404217 diff --git a/src/common/sessiond-comm/sessiond-comm.c b/src/common/sessiond-comm/sessiond-comm.c index 8a5ff1d3f..477bd1c64 100644 --- a/src/common/sessiond-comm/sessiond-comm.c +++ b/src/common/sessiond-comm/sessiond-comm.c @@ -292,7 +292,13 @@ ssize_t lttcomm_send_unix_sock(int sock, void *buf, size_t len) ret = sendmsg(sock, &msg, 0); if (ret < 0) { - PERROR("sendmsg"); + /* + * Only warn about EPIPE when quiet mode is deactivated. + * We consider EPIPE as expected. + */ + if (errno != EPIPE || !opt_quiet) { + PERROR("sendmsg"); + } } return ret; @@ -357,7 +363,13 @@ ssize_t lttcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd) ret = sendmsg(sock, &msg, 0); if (ret < 0) { - PERROR("sendmsg"); + /* + * Only warn about EPIPE when quiet mode is deactivated. + * We consider EPIPE as expected. + */ + if (errno != EPIPE || !opt_quiet) { + PERROR("sendmsg"); + } } return ret; } @@ -466,9 +478,14 @@ ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len) ret = sendmsg(sock, &msg, 0); if (ret < 0) { - PERROR("sendmsg"); + /* + * Only warn about EPIPE when quiet mode is deactivated. + * We consider EPIPE as expected. + */ + if (errno != EPIPE || !opt_quiet) { + PERROR("sendmsg"); + } } - return ret; }