1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-19 14:15:50 +02:00

Bug 160371: Kill the same process the second time results in ArrayIndexOutOfBoundsException and StringIndexOutOfBoundsException

This commit is contained in:
Kushal Munir 2006-10-25 03:29:12 +00:00
parent cf6257e12b
commit c923ecb2cc
3 changed files with 13 additions and 1 deletions

View file

@ -191,6 +191,12 @@ public class DStoreProcessService extends AbstractProcessService implements IPro
// run kill command on host
DStoreHostProcess process = (DStoreHostProcess) getProcess(monitor, PID);
// if there is no process, simply return true
if (process == null) {
return true;
}
DataElement deObj = (DataElement) process.getObject();
DataElement killCmd = ds.localDescriptorQuery(deObj.getDescriptor(), C_PROCESS_KILL);
deObj.setAttribute(DE.A_SOURCE, signal);

View file

@ -75,6 +75,12 @@ public class LocalProcessService extends AbstractProcessService implements ILoca
try
{
process = getProcess(monitor, PID);
// if there is no process, simply return true
if (process == null) {
return true;
}
handler.kill(process, signal);
return true;
}

View file

@ -83,7 +83,7 @@ public abstract class AbstractProcessService implements IProcessService
rpfs.setPid(pidString);
IHostProcess[] results = listAllProcesses(monitor, rpfs);
if (results == null) return null;
if ((results == null) || (results.length == 0)) return null;
else return results[0];
}