+ /*
+ * The application registration thread now owns the application socket
+ * and the global thread state. The thread state is used to wait for
+ * the thread's status, but its ownership now belongs to the thread.
+ */
+ application_socket = -1;
+ if (!wait_thread_status(thread_state)) {
+ thread_state = NULL;
+ goto error;
+ }
+
+ /* Notify all applications to register. */
+ ret = notify_ust_apps(1, is_root);
+ if (ret < 0) {
+ ERR("Failed to notify applications or create the wait shared memory.\n"
+ "Execution continues but there might be problems for already\n"
+ "running applications that wishes to register.");