From c8694926f3bd898d71bce7b1a681a97b6bf6a9e8 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Tue, 8 May 2007 19:11:57 +0000 Subject: [PATCH] dstore shell termination in case exit fails (this is required when a long running process under the shell isn't finished when the user tries to exit the shell) --- .../miners/command/CommandMinerThread.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java index 990a9fa131c..93d285abb30 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java @@ -850,6 +850,20 @@ public class CommandMinerThread extends MinerThread if (_isShell) { sendInput("exit"); //$NON-NLS-1$ + + // in case exit doesn't end it + try + { + Thread.sleep(1000); + } + catch (Exception e) + { + + } + if (_stdOutputHandler.isAlive()) + { + _theProcess.destroy(); + } } }