This way, when the JVM stops the main thread, the agent's thread will be
automatically shutdown thus making the .dispose() call optional.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
this.lttngThreadUser = new LTTngThread(this.sessiondAddr,
this.lttngHandlerUser, this.registerSem);
this.sessiondThUser = new Thread(lttngThreadUser);
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++;
this.sessiondThUser.start();
/* Wait for registration done of per-user sessiond */
nr_acquires++;
this.lttngThreadRoot = new LTTngThread(this.sessiondAddr,
this.lttngHandlerRoot, this.registerSem);
this.sessiondThRoot = new Thread(lttngThreadRoot);
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++;
this.sessiondThRoot.start();
/* Wait for registration done of system-wide sessiond */
nr_acquires++;