public void terminated() {
		Swing.runIfSwingOrRunLater(() -> {
			terminated = true;
			removeLocalAction(actionTerminate);
			panel.terminalListeners.clear();
			panel.setOutputCallback(buf -> {
			});
			panel.getFieldPanel().setCursorOn(false);
			setTitle("[Terminal]");
			setSubTitle("Terminated");
			if (!isVisible()) {
				removeFromTool();
			}
			else {
				panel.setBorder(BorderFactory.createLineBorder(COLOR_TERMINATED, 2));
			}
		});
	}
Notify the provider that the terminal's session has terminated

<p>
The title and sub title are adjusted and all terminal listeners are removed. If/when the
window is closed, it is removed from the tool.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalProvider.java