mirror of https://github.com/adamdruppe/arsd.git
forgot to close read fd on posix
This commit is contained in:
parent
c2c4c00ae1
commit
213fffd1e7
11
terminal.d
11
terminal.d
|
@ -6266,6 +6266,8 @@ version(TerminalDirectToEmulator) {
|
||||||
tew.terminalEmulator.sendRawInput(buffer[0 .. ret]);
|
tew.terminalEmulator.sendRawInput(buffer[0 .. ret]);
|
||||||
tew.terminalEmulator.redraw();
|
tew.terminalEmulator.redraw();
|
||||||
}, fds[0]);
|
}, fds[0]);
|
||||||
|
|
||||||
|
readFd = fds[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
version(Windows) {
|
version(Windows) {
|
||||||
|
@ -6346,6 +6348,10 @@ version(TerminalDirectToEmulator) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
version(Posix) {
|
||||||
|
int readFd = -1;
|
||||||
|
}
|
||||||
|
|
||||||
TerminalEmulator.TerminalCell[] delegate(TerminalEmulator.TerminalCell[] i) parentFilter;
|
TerminalEmulator.TerminalCell[] delegate(TerminalEmulator.TerminalCell[] i) parentFilter;
|
||||||
|
|
||||||
private void addScrollbackLineFromParent(TerminalEmulator.TerminalCell[] lineIn) {
|
private void addScrollbackLineFromParent(TerminalEmulator.TerminalCell[] lineIn) {
|
||||||
|
@ -6507,7 +6513,10 @@ version(TerminalDirectToEmulator) {
|
||||||
// will get stuck indefinitely as it tries to flush its stderr
|
// will get stuck indefinitely as it tries to flush its stderr
|
||||||
version(Windows)
|
version(Windows)
|
||||||
CloseHandle(wi.readPipe);
|
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
|
// try to get it to terminate slightly more forcibly too, if possible
|
||||||
|
|
Loading…
Reference in New Issue