Error running "lttng list" when no sessions are available
This bug applies to master and stable-2.11
When there are no tracing sessions, simply running `lttng list` gives the following result:
Error: Fatal error of the session daemon
while this should be expected
Currently no available tracing session
Bisecting shows this commit introduced the regression: b178f53e90c376dd44b020535c32649edef8f80e
Some debugging shows the problem is in the lttng_list_sessions (lttng-ctl.c) function, where the return value of lttng_ctl_ask_sessiond is 0 when no session is available and that 0 is converted to a fatal error instead of simply being returned as a count of 0 session.