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;
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;
}
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;
}