Files
asterisk/main
Matt Jordan d4e3491293 main/utils: Don't emit an ERROR message if the read end of a pipe closes
An ERROR or WARNING message should generally indicate that something has gone
wrong in Asterisk. In the case of writing to a file descriptor, Asterisk is not
in control of when the far end closes its reading on a file descriptor. If the
far end does close the file descriptor in an unclean fashion, this isn't a bug
or error in Asterisk, particularly when the situation can be gracefully
handled in Asterisk.

Currently, when this happens, a user would see the following somewhat cryptic
ERROR message:

  "utils.c: write() returned error: Broken pipe"

There's a few problems with this:
(1) It doesn't provide any context, other than 'something broke a pipe'
(2) As noted, it isn't actually an error in Asterisk
(3) It can get rather spammy if the thing breaking the pipe occurs often, such
    as a FastAGI server
(4) Spammy ERROR messages make Asterisk appear to be having issues, or can even
    mask legitimate issues

This patch changes ast_carefulwrite to only log an ERROR if we actually had one
that was reasonably under our control. For debugging purposes, we still emit
a debug message if we detect that the far side has stopped reading.

Change-Id: Ia503bb1efcec685fa6f3017bedf98061f8e1b566
2015-12-13 13:22:52 -06:00
..
2015-04-12 13:59:44 -05:00
2015-04-12 13:49:40 -05:00
2014-11-02 08:03:18 +00:00
2014-10-10 12:55:56 +00:00
2015-04-06 18:58:30 +00:00
2015-06-04 20:07:26 +02:00
2015-04-06 18:58:30 +00:00
2015-12-04 12:29:37 -04:00
2013-09-10 17:56:56 +00:00
2014-05-09 22:28:40 +00:00