diff options
author | Matt Jordan <mjordan@digium.com> | 2015-12-14 06:45:07 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-12-14 06:45:07 -0600 |
commit | b47b632107cee441dfd280b415666e28447f5339 (patch) | |
tree | 1651ed007e172229dbe6f5372303a8c9b510cd37 /main/utils.c | |
parent | 3e6637feb581fd8488227e78ae4823be560aafce (diff) | |
parent | 9a96a86e2d95645f05b160d2efc942c1a3c129d2 (diff) |
Merge "main/utils: Don't emit an ERROR message if the read end of a pipe closes"
Diffstat (limited to 'main/utils.c')
-rw-r--r-- | main/utils.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/utils.c b/main/utils.c index 87241f197..b4c494e34 100644 --- a/main/utils.c +++ b/main/utils.c @@ -1399,7 +1399,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; } |