summaryrefslogtreecommitdiff
path: root/main/utils.c
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-12-14 06:45:03 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-12-14 06:45:03 -0600
commit77ac79b175437f3c37f4980cdea6d240a1b26335 (patch)
treec0fe5d97f6de19d3d9ccef6706cf14be3f9d8dd7 /main/utils.c
parent5b867fa9043dec7aee8fbe21a6537efb103e4d92 (diff)
parent94f9927784e63d0e30aa7919b83b0e0fcc35c57e (diff)
Merge "main/utils: Don't emit an ERROR message if the read end of a pipe closes" into 13
Diffstat (limited to 'main/utils.c')
-rw-r--r--main/utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/utils.c b/main/utils.c
index 82e3701d6..f06b16cdc 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -1404,7 +1404,13 @@ int ast_carefulwrite(int fd, char *s, int len, int timeoutms)
if (res < 0 && errno != EAGAIN && errno != EINTR) {
/* fatal error from write() */
- ast_log(LOG_ERROR, "write() returned error: %s\n", strerror(errno));
+ if (errno == EPIPE) {
+#ifndef STANDALONE
+ ast_debug(1, "write() failed due to reading end being closed: %s\n", strerror(errno));
+#endif
+ } else {
+ ast_log(LOG_ERROR, "write() returned error: %s\n", strerror(errno));
+ }
return -1;
}