autodisc: make it possible to interrupt auto source discovery
It is currently not possible to interrupt babeltrace2 while it is doing
auto source discovery. However, it can be a quite long process that the
user might want to interrupt using ctrl-C. This patch makes it possible
to do that.
An interrupter object is taken by the auto source discovery code and
passed all the way to support_info_query_all_sources. In the CLI, the
global `the_interrupter` object, which is set on sigint, is passed.
Because support_info_query_all_sources (and other internal functions)
can now return a few different values (success with a match, success
without a match, error and interrupted), I changed it to return an enum
type. The entry point of auto source discovery,
auto_discover_source_components, can now return "interrupted" as well.
However, since that function doesn't return "no match", I didn't want to
make it use the same return type as support_info_query_all_sources. I
therefore made an "internal" and public version of the status enum.
With this patch, there is no way to interrupt an auto source discovery
started from Python.
Change-Id: I0040c7fab1887c4e05decd0659fa8ff3c85a16a1
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1972
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
This page took 0.026989 seconds and 4 git commands to generate.