Fix: lttng-ust-jul: set thread in daemon mode
authorDavid Goulet <dgoulet@efficios.com>
Thu, 26 Jun 2014 19:07:54 +0000 (15:07 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 Jun 2014 19:09:29 +0000 (15:09 -0400)
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>
liblttng-ust-jul/org/lttng/ust/jul/LTTngAgent.java

index 2485be2deb1781c05451eafaddd0a284ad89ec3b..6717cd1e306e69ff2a3efcb983f165e320f39bf7 100644 (file)
@@ -128,6 +128,7 @@ public class LTTngAgent {
                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++;
@@ -136,6 +137,7 @@ public class LTTngAgent {
                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 page took 0.025535 seconds and 4 git commands to generate.