Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid McKnight2010-09-30 18:54:40 +0000
committerDavid McKnight2010-09-30 18:54:40 +0000
commiteaa38a4ae40ec7144b2d46a6dd094de49cda8752 (patch)
tree68db85ca80503e71bbac8e7b2dbf82f4bf15aefb
parentac33368f4b3af43a0f35085578fa2245d357735a (diff)
downloadorg.eclipse.tm-eaa38a4ae40ec7144b2d46a6dd094de49cda8752.tar.gz
org.eclipse.tm-eaa38a4ae40ec7144b2d46a6dd094de49cda8752.tar.xz
org.eclipse.tm-eaa38a4ae40ec7144b2d46a6dd094de49cda8752.zip
[319164][dstore][shells] shell cleanup threads stay around indefinitely when spirit is off
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java
index 0a179324b..21cc5560e 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@
* Contributors:
* David McKnight (IBM) - [202822] cleanup output datalements after use
* Martin Oberhuber (Wind River) - [225510][api] Fix OutputRefreshJob API leakage
+ * David McKnight (IBM) - [319164][dstore][shells] shell cleanup threads stay around indefinitely when spirit is off
*******************************************************************************/
package org.eclipse.rse.internal.subsystems.shells.dstore;
@@ -44,6 +45,7 @@ public class DStoreServiceCommandShell extends ServiceCommandShell
private DataElement _status;
private DataStore _ds;
private boolean _done = false;
+ private int _timesWaited = 0;
public CleanUpSpirited(DataElement status, String name)
{
@@ -59,11 +61,12 @@ public class DStoreServiceCommandShell extends ServiceCommandShell
public void run()
{
- while (!_done)
+ while (!_done && _timesWaited < 3) // limit the attempts to 3, since it's possible that, on the server, spirit is off
{
try
{
Thread.sleep(10000);
+ _timesWaited++;
}
catch (Exception e)
{
@@ -87,7 +90,7 @@ public class DStoreServiceCommandShell extends ServiceCommandShell
_ds.getDomainNotifier().removeDomainListener(this);
_done = true;
- }
+ }
}
}
}
@@ -138,7 +141,7 @@ public class DStoreServiceCommandShell extends ServiceCommandShell
DStoreShellOutputReader reader = (DStoreShellOutputReader)shell.getStandardOutputReader();
return reader.getWorkingDirectory();
}
-
+
public void shellOutputChanged(IHostShellChangeEvent event)
{
IHostOutput[] lines = event.getLines();

Back to the top