8166655: JShell: Process running JShell should not be blocked from exit by non-daemon data-transfer threads
Reviewed-by: jlahoda
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DemultiplexInput.java Fri Sep 23 14:37:03 2016 -0700
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DemultiplexInput.java Mon Sep 26 13:18:11 2016 -0700
@@ -45,6 +45,7 @@
DemultiplexInput(InputStream input, Map<String, OutputStream> io, Iterable<OutputStream> closeList) {
super("output reader");
+ setDaemon(true);
this.delegate = new DataInputStream(input);
this.io = io;
this.closeList = closeList;
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIEventHandler.java Fri Sep 23 14:37:03 2016 -0700
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIEventHandler.java Mon Sep 26 13:18:11 2016 -0700
@@ -53,6 +53,7 @@
this.vm = vm;
this.reportVMExit = reportVMExit;
this.thread = new Thread(this, "event-handler");
+ this.thread.setDaemon(true);
}
/**