From 213fffd1e7d681ba579113b82d9c30e8c97b0bad Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Thu, 8 Oct 2020 12:43:16 -0400 Subject: [PATCH] forgot to close read fd on posix --- terminal.d | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/terminal.d b/terminal.d index 421d4d9..8b38fa0 100644 --- a/terminal.d +++ b/terminal.d @@ -6266,6 +6266,8 @@ version(TerminalDirectToEmulator) { tew.terminalEmulator.sendRawInput(buffer[0 .. ret]); tew.terminalEmulator.redraw(); }, fds[0]); + + readFd = fds[0]; } version(Windows) { @@ -6346,6 +6348,10 @@ version(TerminalDirectToEmulator) { } } + version(Posix) { + int readFd = -1; + } + TerminalEmulator.TerminalCell[] delegate(TerminalEmulator.TerminalCell[] i) parentFilter; private void addScrollbackLineFromParent(TerminalEmulator.TerminalCell[] lineIn) { @@ -6507,7 +6513,10 @@ version(TerminalDirectToEmulator) { // will get stuck indefinitely as it tries to flush its stderr version(Windows) CloseHandle(wi.readPipe); - // FIXME: should I close it on Linux too? + version(Posix) { + import unix = core.sys.posix.unistd; + unix.close(wi.readFd); + } } // try to get it to terminate slightly more forcibly too, if possible