X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=6f032da112baae7a9a97af061f4388bc621b6d6d;hp=c30792c3c785e959968dc9c00434c0e12af1ec73;hb=2c57e06ddcdb92e863755595000f162729130845;hpb=1dac0189ed7311146ff2cfc6605bac81213ee90b diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index c30792c3c..6f032da11 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -431,6 +431,9 @@ void delete_ust_app_channel(int sock, struct ust_app_channel *ua_chan, * Must be called with the registry lock held. * * On success, return the len of metadata pushed or else a negative value. + * Returning a -EPIPE return value means we could not send the metadata, + * but it can be caused by recoverable errors (e.g. the application has + * terminated concurrently). */ ssize_t ust_app_push_metadata(struct ust_registry_session *registry, struct consumer_socket *socket, int send_zero_data) @@ -454,9 +457,10 @@ ssize_t ust_app_push_metadata(struct ust_registry_session *registry, /* * On a push metadata error either the consumer is dead or the * metadata channel has been destroyed because its endpoint - * might have died (e.g: relayd). If so, the metadata closed - * flag is set to 1 so we deny pushing metadata again which is - * not valid anymore on the consumer side. + * might have died (e.g: relayd), or because the application has + * exited. If so, the metadata closed flag is set to 1 so we + * deny pushing metadata again which is not valid anymore on the + * consumer side. */ if (registry->metadata_closed) { return -EPIPE; @@ -547,6 +551,9 @@ error_push: * of socket throughout this function. * * Return 0 on success else a negative error. + * Returning a -EPIPE return value means we could not send the metadata, + * but it can be caused by recoverable errors (e.g. the application has + * terminated concurrently). */ static int push_metadata(struct ust_registry_session *registry, struct consumer_output *consumer)