diff options
author | Rémi Denis-Courmont | 2014-08-20 23:06:07 +0300 |
---|---|---|
committer | Martin Storsjö | 2014-08-25 10:49:14 +0300 |
commit | 6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f (patch) | |
tree | e6971b95e3a5073be0a3a27c2e7f4ba70daa3d3e /libavformat/tcp.c | |
parent | b263f8ffe7599d9cd27ec477a12700da8eb2790d (diff) |
libavformat: use MSG_NOSIGNAL when applicable
If the remote end of a connection oriented socket hangs up, generating
an EPIPE error is preferable over an unhandled SIGPIPE signal.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r-- | libavformat/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index cbd51422a8..27a01845c5 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -154,7 +154,7 @@ static int tcp_write(URLContext *h, const uint8_t *buf, int size) if (ret < 0) return ret; } - ret = send(s->fd, buf, size, 0); + ret = send(s->fd, buf, size, MSG_NOSIGNAL); return ret < 0 ? ff_neterrno() : ret; } |