Fix: Empty metadata buffer(s) on HUP|ERR
authorDavid Goulet <dgoulet@efficios.com>
Tue, 16 Oct 2012 18:21:29 +0000 (14:21 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 16 Oct 2012 18:21:29 +0000 (14:21 -0400)
commit4bb94b7597f56f5200ebd6a88e906488172241fb
tree63b85b8a067fc1b7b03ccd417a2e0851ca3138ac
parent4dbc372b53ef1ac713497164e7a8b92100db7ae2
Fix: Empty metadata buffer(s) on HUP|ERR

The metadata fd was not emptying all the buffers on POLLHUP | POLLERR.
This patch makes the read subbuffer operation, for hung up metadata fd,
loop until the returned len is a negative value. For user space tracing,
-EAGAIN is returned and -ENODATA for the kernel tracer.

We also fixes another issue where an error returned (not -EAGAIN) by the
read subbuffer function call was stopping the thread. Now, the fd is
removed from the poll set, the stream is freed and the thread continues.

Fixes #378

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