Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2007-04-20 15:56:53 +0000
committerPascal Rapicault2007-04-20 15:56:53 +0000
commit89f7944a131d088a1ab5eab96a7a971505b346d0 (patch)
tree162265f3f6ebef289c140f814eef9a84b44b257c /bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core
parenta6066a33499907580f30b3f2873cf8b5a665435b (diff)
downloadrt.equinox.framework-89f7944a131d088a1ab5eab96a7a971505b346d0.tar.gz
rt.equinox.framework-89f7944a131d088a1ab5eab96a7a971505b346d0.tar.xz
rt.equinox.framework-89f7944a131d088a1ab5eab96a7a971505b346d0.zip
Bug 183288 - [console] Lockup condition during an interrupt
Diffstat (limited to 'bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core')
-rw-r--r--bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java34
1 files changed, 19 insertions, 15 deletions
diff --git a/bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java b/bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java
index 90ccef4ba..08a6734c7 100644
--- a/bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java
+++ b/bundles/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java
@@ -217,7 +217,8 @@ public class FrameworkConsole implements Runnable {
try {
console();
} catch (IOException e) {
- e.printStackTrace(out);
+ if (!shutdown)
+ e.printStackTrace(out);
}
}
}
@@ -299,20 +300,23 @@ public class FrameworkConsole implements Runnable {
public synchronized void disconnect() {
if (!disconnect) {
disconnect = true;
- if (out != null)
- out.close();
- if (s != null)
- try {
- s.close();
- } catch (IOException ioe) {
- // do nothing
- }
- if (in != null)
- try {
- in.close();
- } catch (IOException ioe) {
- // do nothing
- }
+ // We don't want to close System.in and System.out
+ if (useSocketStream) {
+ if (s != null)
+ try {
+ s.close();
+ } catch (IOException ioe) {
+ // do nothing
+ }
+ if (out != null)
+ out.close();
+ if (in != null)
+ try {
+ in.close();
+ } catch (IOException ioe) {
+ // do nothing
+ }
+ }
}
}

Back to the top