From 6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f Mon Sep 17 00:00:00 2001 From: Rémi Denis-Courmont Date: Wed, 20 Aug 2014 23:06:07 +0300 Subject: libavformat: use MSG_NOSIGNAL when applicable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavformat/unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/unix.c') diff --git a/libavformat/unix.c b/libavformat/unix.c index ab57c68195..5c6f576487 100644 --- a/libavformat/unix.c +++ b/libavformat/unix.c @@ -124,7 +124,7 @@ static int unix_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; } -- cgit v1.2.3