@Override
    public void run() {

        boolean done = false;

        try {
            Shell sh = ShellManager.getReference().getShell(m_ConnectionData.getLoginShell());
            do {
                sh.run(this);
                if (m_Dead) {
                    done = true;
                    break;
                }
                sh = getNextShell();
                if (sh == null) {
                    done = true;
                }
            } while (!done || m_Dead);

        } catch (Exception ex) {
            log.error("run()", ex); // Handle properly
        } finally {
            // call close if not dead already
            if (!m_Dead) {
                close();
            }
        }
        log.debug("run():: Returning from " + toString());
    }// run