X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fht-cleanup.c;h=91c0544c3c8a28c8c8391b1d5f76b0927a48bab5;hp=09c13fe003d7d40c5af423a5bf98634e853e0162;hb=df119599f9c1994b5f4a9f6f562581bee13c0f13;hpb=faadaa3a56561aca9dbd8f10f91d1e0fc40ed7e2 diff --git a/src/bin/lttng-sessiond/ht-cleanup.c b/src/bin/lttng-sessiond/ht-cleanup.c index 09c13fe00..91c0544c3 100644 --- a/src/bin/lttng-sessiond/ht-cleanup.c +++ b/src/bin/lttng-sessiond/ht-cleanup.c @@ -128,6 +128,7 @@ static void *thread_ht_cleanup(void *data) health_code_update(); while (1) { + restart: DBG3("[ht-thread] Polling."); health_poll_entry(); ret = lttng_poll_wait(&events, -1); @@ -181,6 +182,13 @@ static void *thread_ht_cleanup(void *data) lttng_ht_destroy(ht); health_code_update(); + + /* + * Ensure that we never process the quit pipe + * event while there is still data available + * on the ht clean pipe. + */ + goto restart; } else if (revents & (LPOLLERR | LPOLLHUP | LPOLLRDHUP)) { ERR("ht cleanup pipe error"); goto error;