- this.lttngThread = new LTTngThread(this.sessiondAddr,
- getPortFromFile(), this.lttngHandler, this.registerSem);
- this.sessiondTh = new Thread(lttngThread);
- this.sessiondTh.start();
-
- this.initialized = true;
-
- /* Wait for the registration to end. */
+ /* Handle user session daemon if any. */
+ this.lttngThreadUser = new LTTngThread(this.sessiondAddr,
+ this.lttngHandlerUser, this.registerSem);
+ this.sessiondThUser = new Thread(lttngThreadUser);
+ this.sessiondThUser.setDaemon(true);
+ this.sessiondThUser.start();
+ /* Wait for registration done of per-user sessiond */
+ nr_acquires++;
+
+ /* Handle root session daemon. */
+ this.lttngThreadRoot = new LTTngThread(this.sessiondAddr,
+ this.lttngHandlerRoot, this.registerSem);
+ this.sessiondThRoot = new Thread(lttngThreadRoot);
+ this.sessiondThRoot.setDaemon(true);
+ this.sessiondThRoot.start();
+ /* Wait for registration done of system-wide sessiond */
+ nr_acquires++;
+
+ /* Wait for each registration to end. */