1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

fix for shell initialization problems - where working directory gives exception and when the thread hashmap hits exception

This commit is contained in:
David McKnight 2006-09-28 14:43:18 +00:00
parent f627c05a6d
commit 5d113e2520
2 changed files with 21 additions and 6 deletions

View file

@ -222,15 +222,22 @@ public class CommandMiner extends Miner
{
//First Check to make sure that there are no "zombie" threads
Iterator iter = _threads.keySet().iterator();
while (iter.hasNext())
try
{
String threadName = (String) iter.next();
CommandMinerThread theThread = (CommandMinerThread) _threads.get(threadName);
if ((theThread == null) || (!theThread.isAlive()))
while (iter.hasNext())
{
_threads.remove(threadName);
String threadName = (String) iter.next();
CommandMinerThread theThread = (CommandMinerThread) _threads.get(threadName);
if ((theThread == null) || (!theThread.isAlive()))
{
_threads.remove(threadName);
}
}
}
catch (Exception e)
{
_dataStore.trace(e);
}
CommandMinerThread newCommand = new CommandMinerThread(subject, invocation, status, getPatterns(), _descriptors);
_threads.put(status.getAttribute(DE.A_ID), newCommand);
newCommand.start();

View file

@ -128,7 +128,15 @@ public class CommandMinerThread extends MinerThread
File theDirectory = new File(_cwdStr);
if (!theDirectory.isDirectory())
theDirectory = theDirectory.getParentFile();
_cwdStr = theDirectory.getAbsolutePath();
try
{
_cwdStr = theDirectory.getAbsolutePath();
}
catch (Exception e)
{
_cwdStr = System.getProperty("user.home");
}
String theShell = null;
if (!_isWindows)