Bug #899
closedAutomatically-started lttng-sessiond does not like return code 2.
0%
Description
When sending commands to an agent, the sessiond expects return codes "1" for success and "2" for error. For example, the Java agent can return "2" due to bug #884.
It seems there is a difference of behaviour depending on if the sessiond was started manually prior to running "lttng", or if it was created via a "lttng create".
If the sessiond was started manually on its own, it will accept both return codes 1 and 2. It works with both a user or root sessiond.
However if the sessiond was spawned automatically by "lttng create", it will continue accepting return code 1 as usual, but will not like 2 as much, and will print the following to the console every time it is received:
Error: Agent returned an unknown code: 2
This only happens when the sessiond was started automatically. A manually-started one will not print this message.
Other than this message, the behaviour seems fine and traces have the correct contents.