1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

[244070] [dstore] DStoreHostShell#exit() does not terminate child processes

This commit is contained in:
David McKnight 2009-02-03 22:13:16 +00:00
parent 9078e7f688
commit 234cf10c04

View file

@ -13,6 +13,7 @@
*
* Contributors:
* David McKnight (IBM) [251619] [dstore] shell output readers not cleaned up on disconnect
* David McKnight (IBM) [244070] [dstore] DStoreHostShell#exit() does not terminate child processes
*******************************************************************************/
package org.eclipse.rse.internal.services.dstore.shells;
@ -72,8 +73,19 @@ public class DStoreHostShell extends AbstractHostShell implements IHostShell
public void exit()
{
writeToShell("exit"); //$NON-NLS-1$
// send cancel command
DataElement command = _status.getParent();
DataStore dataStore = command.getDataStore();
DataElement cmdDescriptor = command.getDescriptor();
DataElement cancelDescriptor = dataStore.localDescriptorQuery(cmdDescriptor, "C_CANCEL"); //$NON-NLS-1$
if (cancelDescriptor != null)
{
dataStore.command(cancelDescriptor, command);
}
_status.setAttribute(DE.A_VALUE, "done"); //$NON-NLS-1$
_stdoutHandler.finish();
_stderrHandler.finish();