Fix: Add EPIPE error handling on buffer splice
authorDavid Goulet <dgoulet@efficios.com>
Tue, 6 Nov 2012 14:41:35 +0000 (09:41 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 6 Nov 2012 14:41:35 +0000 (09:41 -0500)
commit00c8752be51d75fcec3c30302db3d42cd714f02c
tree175fbb3760d6bf631acf2154f6db01e57c7c1f75
parent3c14c33fe61a2011881075506e6946ca5cdf23c1
Fix: Add EPIPE error handling on buffer splice

Even though this is _not_ documented in splice(2), if the fd_out is a
socket but closed on one end, splice returns a negative value and set
errno to EPIPE. The man page specifies a EBADF but I guess both are
possible (and it is according to the kernel 3.6.2 source).

So, when streaming a kernel session (using splice), if the relayd quits,
a splice on the socket returns an EPIPE.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer.c
This page took 0.024642 seconds and 4 git commands to generate.