mirror of https://github.com/termux/termux-app
terminal emulator: flush remaining process output data when terminating session
This commit is contained in:
parent
619552ec5c
commit
5a70be1523
|
@ -110,13 +110,13 @@ public final class TerminalSession extends TerminalOutput {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
if (msg.what == MSG_NEW_INPUT && isRunning()) {
|
int bytesRead = mProcessToTerminalIOQueue.read(mReceiveBuffer, false);
|
||||||
int bytesRead = mProcessToTerminalIOQueue.read(mReceiveBuffer, false);
|
if (bytesRead > 0) {
|
||||||
if (bytesRead > 0) {
|
mEmulator.append(mReceiveBuffer, bytesRead);
|
||||||
mEmulator.append(mReceiveBuffer, bytesRead);
|
notifyScreenUpdate();
|
||||||
notifyScreenUpdate();
|
}
|
||||||
}
|
|
||||||
} else if (msg.what == MSG_PROCESS_EXITED) {
|
if (msg.what == MSG_PROCESS_EXITED) {
|
||||||
int exitCode = (Integer) msg.obj;
|
int exitCode = (Integer) msg.obj;
|
||||||
cleanupResources(exitCode);
|
cleanupResources(exitCode);
|
||||||
mChangeCallback.onSessionFinished(TerminalSession.this);
|
mChangeCallback.onSessionFinished(TerminalSession.this);
|
||||||
|
|
Loading…
Reference in New Issue