+/*
+ * List tracker PID(s) of session and domain.
+ */
+static int list_tracker_pids(void)
+{
+ int enabled, ret;
+ int *pids = NULL;
+ size_t nr_pids;
+
+ ret = lttng_list_tracker_pids(handle,
+ &enabled, &pids, &nr_pids);
+ if (ret) {
+ return ret;
+ }
+ if (enabled) {
+ int i;
+ _MSG("PID tracker: [");
+
+ for (i = 0; i < nr_pids; i++) {
+ if (i) {
+ _MSG(",");
+ }
+ _MSG(" %d", pids[i]);
+ }
+ _MSG(" ]\n\n");
+ }
+ free(pids);
+ return 0;
+}
+