Fix: Delete stream on write error in consumer
authorDavid Goulet <dgoulet@efficios.com>
Wed, 24 Oct 2012 16:40:59 +0000 (12:40 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 24 Oct 2012 16:40:59 +0000 (12:40 -0400)
commitab1027f48fa7e2dd29b3c85548ec42f26d06be25
treea219e3688ab1a5ce55269d3d77d48c22de29e1bb
parentdda67f6c1ffa2bd1bb106b21d1ee353a4c1245f8
Fix: Delete stream on write error in consumer

Whenever a write() error occured, both on network or local trace file,
the consumer thread just died considering the error a fatal one.

This commit fixes that by simply deleting the stream, removing it from
the poll set of the thread and freeing it.

Furthermore, on a write() error, a SIGPIPE is usually raised if the FD
is invalid. The consumer is catching this signal but was initiating a
should exit action thus ultimately cleaning all threads. We now still
catch SIGPIPE but don't set the should quit flag so normal cleanup can
be done by the threads.

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