@Override
  public TerminalListener createTerminal(@Nls String pipeName,
                                         OutputStream terminalInput,
                                         InputStream terminalOutput,
                                         InputStream stderr) {
    final TerminalHandler terminalHandler = myLogManager.addTerminal(pipeName, terminalOutput, terminalInput);

    return new TerminalListener() {

      @Override
      public void close() {
        if (terminalHandler != null) {
          terminalHandler.close();
        }
      }

      @Override
      public void setTtyResizeHandler(@Nullable TtyResizeHandler ttyResizeHandler) {
        if (terminalHandler instanceof TerminalHandlerBase && ttyResizeHandler != null) {
          ((TerminalHandlerBase)terminalHandler).setResizeHandler(ttyResizeHandler);
        }
      }
    };
  }
@Override
  public TerminalListener createTerminal(@Nls String pipeName,
                                         OutputStream terminalInput,
                                         InputStream terminalOutput,
                                         InputStream stderr)