changeset 3664:63ff1dda242d

8166655: JShell: Process running JShell should not be blocked from exit by non-daemon data-transfer threads Reviewed-by: jlahoda
author rfield
date Mon, 26 Sep 2016 13:18:11 -0700
parents d4e74af5616d
children 9b0df83fb78c
files src/jdk.jshell/share/classes/jdk/jshell/execution/DemultiplexInput.java src/jdk.jshell/share/classes/jdk/jshell/execution/JDIEventHandler.java
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.jshell/share/classes/jdk/jshell/execution/DemultiplexInput.java	Fri Sep 23 14:37:03 2016 -0700
+++ b/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/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIEventHandler.java	Fri Sep 23 14:37:03 2016 -0700
+++ b/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);
     }
 
     /**