for (Map.Entry<String,String> e : env.getEnv().entrySet()) {
session.put(e.getKey(), e.getValue());
}
session.put("LINES", Integer.toString(terminal.getTerminalHeight()));
session.put("COLUMNS", Integer.toString(terminal.getTerminalWidth()));
env.addSignalListener(new SignalListener() {
public void signal(Signal signal) {
session.put("LINES", Integer.toString(terminal.getTerminalHeight()));
session.put("COLUMNS", Integer.toString(terminal.getTerminalWidth()));
}
}, Signal.WINCH);